This one was a pain in the ass. It seems like pre-Oracle 10g SQL will not always run on 10g. The construct in question is :
WHENEVER oserror EXIT failure
In 10g, this will fail with the error message :
O/S Message: No such file or directory
Thanks to the Annals of Oracle’s Improbable Errors [...]
I was stuck on a machine with a lot of scripts that had the dreaded ^M at the end of each line. These were Windows files in a huge zip file, and it was a pain to use the FTP to move that zip file over again. Dos2unix wasn’t installed, nor was perl. One way [...]
The following options are useful in SQLplus when spooling to a file. They make sure there are no headers or other stuff in the output that does not execute in SQLPlus.
— Do not print the number of records selected, updated, ..
SET feedback off
— Do not print column headings
[...]
If you want to loop over values in a file, the read command in Linux/Unix is very useful. It reads a line from a file, and assigns as many variables as you specify as parameters to the values in that line. Combined with a while loop, you can read the values and process them. Here’s [...]