Monday, 14 December 2009

Running Oracle SQL Scripts

Here are some commands at the top of the script that might make the auditors job much easier.

spool outputFile.txt  --creates a log of what you are doing

SELECT ora_database_name from dual;

set time on – show you the time the statement ran
set echo on  --echo the statement
set flush on   --does nothing
set feedback on – show variable substitutions
set timing on – show you how long the statement took to run

--Body of script goes here

spool off  --Derrrr, turns of the spooling

quit –- logs you out of SQL plus!

No comments:

Extending JDE to generative AI