SQL*Plus script to write SID to a .txt file
472934Oct 28 2008 — edited Oct 28 2008As part of a bigger set of Windows/DOS batch scripts I am running I want to be able to create a .txt file containing just one line and this line should be the SID of the database.
I was thinking that a SQL*Plus script using spool would enable this, however I cannot work out how to get simply the SID written into the resultant .txt file created by the spool.
Any suggestions on how I might achieve this much appreciated.
Thanks,
Andy