Top 60 Oracle Blogs

Recent comments

December 2007

Google - just another big, dumb, brutal organisation?

I found this article in The Economist interesting:

There's some truth there, I think. Google is buying stuff (like blogger), is making pirate copies (sorry: clones) of other companies' software and in general trying to be as dominant and brutal as Microsoft, IBM, Oracle and the others. Yawn.

What the Hell happened to "Don't do evil"? Why did Google sell out to the Chinese horror regime?

They're just after the money and the happiness of shareholdes. Boring stuff.


Perl version of Snapper

Wolfgang Breitling has written a script – Perl version of my original snapper.sql one. Check it out!
As his script doesn’t rely on DBMS_OUTPUT for generating output, you can easily get real time continuous output with his script, without needing to wait until the script finishes or by using somewhat complicated DBMS_SYSTEM.KSDWRT tracefile output.
Also, as his script doesn’t rely on DBMS_LOCK package for sleeping, so you don’t need rights on it.

Mobile phones, fats and backups

As with such things, life has been rather dull since the fire - relatively speaking. Fortunately, I had a wonderful thing happening to my mobile phone that brightened several of my days before Christmas.

It all started about half a year ago, when the menu button on my Nokia E60 stopped working. That's rather inconvenient, but I could still call people up and receive calls, so no big problem.

Then, one Saturday in December, the old team from the National Nurses' Dormitory in Copenhagen had our annual, traditional, Danish Christmas lunch in a place called Told & Snaps in Copenhagen. When the frist dish was brought in - pickled herrings, of course - my dear friend Ole and I decided to see if soft butter on the keys could bring the menu button back to life. So we, uhm, buttered the keyboard - and it worked! The menu button worked again!

Sqlplus is my second home, part 5: Reading the name of currently executing script

If you need to run and manage loads of sqlplus scripts which call other scripts, which call other scripts etc, then you are probably interested in the sqlplus APPINFO parameter shown below.

When you issue SET APPINFO ON in sqlplus, this makes sqlplus to automatically call DBMS_APPLICATION_INFO.SET_MODULE and set the MODULE value to sql script name which is currently being executed.

This allows you to easily pass the current script name info to Oracle, without the need to have a manual call to SET_MODULE in beginning and end of every script (along with some mechanism for storing the previous module).

A simple example is below. I used two scripts blah.sql and blah2.sql for my test:

C:\tmp>type c:\tmp\blah.sql

select sys_context(‘USERENV’, ‘MODULE’) from dual;


select sys_context(‘USERENV’, ‘MODULE’) from dual;

C:\tmp>type c:\tmp\blah2.sql

The Fire, part II

Turns out there are many more good things to be said about this incident:

a. The entire house will be cleaned for Christmas.
b. All windows will be cleaned.
c. The entire first floor will be re-painted.
d. We'll get a complete list of our posessions.
e. Since the entire first floor has been emtied, we can now do all the things we always dreamed of doing up there.
f. My hand-made Italian shoes will be replaced, which is good, since little Viktor removed one of my shoe laces some months ago, and we haven't been able to locate it since.
g. We now live (with the consent of my wife Anette) on top of a bar, and the owner - Jytte - is one of the most heart-warming people I've ever met. Her magnificient helper Linda immediately moved out of her apartment so that we could stay there - just to mention one detail out of many.

SQL Developer Migration Workbench

After years of relying on third party developers to create GUI tools for use in developing SQL on Oracle databases, the SQL Developer application was released by Oracle.

First released as Raptor, this is not new news. What is new however is version 1.2.

SQL Developer 1.2

Being a dyed-in-the-wool sqlplus and vi kind of guy, I have never made extensive use of SQL Developer, though I do use it a lot when browsing schemas and/or data.

What I discovered today however was just an amazing addition to SQL Developer.

With version 1.2 , the Migration Workbench has itself been migrated, into SQL Developer.

SQL Developer Migration Workbench

I had occasion today to make use of the migration workbench, and I was impressed with how simple it was to migrate SQL Server data to Oracle.

SQL Developer was able to connect directly to SQL Server, create a migration catalog, generate scripts to duplicate the SQL Server database objects in an Oracle Schema, and migrate the data.

The documentation for actually doing the migration is pretty good.

Setting up the native authentication was somewhat problematic however.

The SQL Developer documentation referenced earlier does a good job of showing you how to setup the JDBC connection, but does not explain how to setup Windows Authentication.

The solution was found after rooting around in the SQL Developer forum.

The JDBC driver used to connect SQL Developer to SQL Server is from the jTDS Project.

After extracting the jdbc driver from it, another file needs to be extracted where it can be used by SQL Developer.

This file is ntmlauth.dll, found in the x86/SSO path in the jtds zip file.

Assuming that SQL Developer was installed on a Windows box at C:\sqldeveloper, ntmlauth.dll needs to be copied to c:\sqldeveloper\jdk\jre\bin.

After doing that, Windows authentication from SQL Developer to SQL Server worked perfectly.

The entire process of migrating the data from SQL Server to Oracle was pretty much a point and click affair.