Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL*Plus script to write SID to a .txt file

472934Oct 28 2008 — edited Oct 28 2008
As 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2008
Added on Oct 28 2008
1 comment
333 views