Keep in mind that, unless they've changed the function, spool also searches the sqlpath for files.
If you say: spool modify_users.sql select 'alter user '||username||'whatever;' from dba_users; spool off Spool just looked in your current directory for a file named modify_users.sql to replace, then it followed your sqlpath for a file to replace (file permissions allowing), if it doesn't find one then it creates one in your current directory. > -----Original Message----- > From: Stephen Andert [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 14, 2003 2:20 PM > To: Multiple recipients of list ORACLE-L > Subject: Re: How to tell Oracle the directories of script files > > > export SQLPATH=/usr/users/oracle/dba/scripts:/app/oracle/admin > > before you run SQL*Plus > > HTH > Stephen > > >>> [EMAIL PROTECTED] 08/14/03 11:09AM >>> > > Hello, > Suppose I have some SQL scripts in my /home/user directories, > /usr/local/bin > directories, etc. > If I start 'sqlplus' from console in /home/user directories, I can > load/execute the script by doing: > SQL> @scriptname > > But what if I don't start sqlplus from that directories? How do I tell > Oracle > to find the scripts in /home/user, then if it's not there in > /usr/local/bin, > for example? So that I can be anywhere in the filesystem when starting > > sqlplus and can execute my SQL script. > > Just like the $PATH environment variables in *nix system that tell the > shell > where to find executables, is there a similar thing for Oracle? > > Thanks for any help. > > RDB > > -- > Reuben D. Budiardja > Department of Physics and Astronomy > The University of Tennessee, Knoxville, TN > ------------------------------------------------- > /"\ ASCII Ribbon Campaign against HTML > \ / email and proprietary format > X attachments. > / \ > ------------------------------------------------- > Have you been used by Microsoft today? > Choose your life. Choose freedom. > Choose LINUX. > ------------------------------------------------- > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Reuben D. Budiardja > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Stephen Andert > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Anderson, Brian INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).