Posts from January 27, 2006

curious case of the missing spool file

Bit of a ghostly theme today.

One great aspect of my job is that I write SQL scripts that are reviewed and executed by other people. This suits me just fine. The less work for me, the better.

Obviously, I never add 'spool off' to the tail of a SQL*Plus script. This is a whole ten characters to type (including newline). Multiply this by all the SQL scripts you might produce in a lifetime and just think of how much time that would waste. In any case, everyone knows that 'exit' implies a 'spool off' anyway.

A while ago, a friendly Oracle DBA ran my SQL script and called me to tell me it had finished. I asked him to email the spooled output for review. He said there was no spooled output generated. I asked him to check the current directory (no), %ORACLE_HOME%\BIN directory (no), the Recycle Bin (no), search all local hard drives for 'patch_prod.lst' (no).

I asked him if the SQL*Plus session was still open and, if so, to simply type 'spool off'. He replied that the SQL*Plus session had already been ended. I was puzzled until I asked 'Is this the GUI version of SQL*Plus on Windows ?' 'Yes', he replied. 'Did you end the session by hitting the 'X' button ?' 'Yes'.

So, it turns out that the spool file is lost when Windows SQL*Plus is terminated using the 'X' button. I didn't know this fact because I normally use 'exit' to close any SQL*Plus session on Unix, Dos Command Window or Cygwin.

I had a suspicion that this gentleman was privately quite enjoying this moment and my discomfort so I said 'Hmm - that's a shame. I really wanted to check the spool to ensure that I had deleted the correct 7.9 million invoices from production'.

Later on, I asked myself what type of ~~mindless idio~~ person uses 'X' to terminate a Windows SQL*Plus session.

Then the answer struck me. A lazy one. Like me.

Most Haunted

tv

Most Haunted is a fantastic TV program hosted by Yvette Fielding, where a Liverpudlian psychic medium, Derek Acorah, visits haunted properties resurrecting the spirits of dear, dead departed souls.

The program is notable for absolutely superb acting by Acorah who can fulfil a variety of roles, effortlessly adopting the voice of tortured, Victorian ladies, in pitch darkness, without the aid of a script.

The supporting actors (Fielding and the camera crew) are also superb. They are simply wasted on Living TV. A career in Hollywood surely beckons.

I was fortunate enough to catch a 'Best of Most Haunted' over Christmas. It was simply the most riveting, compulsive, hilarious viewing.

Most Haunted

I have been playing a CD in my car on Disc-Random-Shuffle mode for ten weeks. The CD contains close to 200 songs. I have heard all the songs once, some twice and a handful three times.

This morning, I heard something that sent a shiver down my spine, chilled my bones and momentarily froze me to the spot.

'Spectre versus Rector' by The Fall. This 'song' is a 8 minute rant from Mark E. Smith accompanied by some noise, detailing a ghostly story from the 'Dragnet' LP. 'Spectre versus Rector' sounds as if it was recorded in a bleak, industrial warehouse somewhere up North with a hand-held tape recorder.

The very last song to be selected. Spooky.

Unix for lazy people

I am a very efficient lazy person. I dont like to type seven characters when two will suffice. I think Unix is a fantastic development environment. However, the overly long, verbose commands irritate me slightly. So I use the following aliases and shell functions

    a = tail -f ${ORACLE\_HOME}/rdbms/log/alert\_PRD.log
    l = ls
    ll = ls -l
    up = cd ..
    x = rm -fr \*
    z = wall 'Anyone fancy a quickie after work ?' [disciplinary action pending]

One of the happiest days of my life was when I discovered the tab completion feature in the GNU bash shell and the environment variable $OLDPWD.

When I used to work for Sequent (with an operating system called Dynix/ptx devoid of applications), I used to carry the GNU tools and utilities around on a cartridge tape. Unix and GNU tools were brilliant but the best development tool is Emacs.

The second happiest day of my life was when I discovered Emacs' dynamic abbreviation feature. If you had had to suffer the pain of typing 'supercalifragilisticexpialidoceous' once, then subsequently, you could just type 'sup' following by ESC-/ and Emacs automatically, magically completed the word.

This was without doubt the best feature in Emacs. Well apart from Gnus, VM, font-lock, C-mode, dired, support for shell, grep and cc. Oh and apart from being able to edit text files.