Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SPOOLing from SQPLUS within UNIX script 1

Status
Not open for further replies.

MCubitt

Programmer
Mar 14, 2002
1,081
GB
I am writing a script on AIX to SQLPLUS with /nolog and to run a script.

Within AIX I specifiy the location and file of the script by /unix/format/path.

How do I SPOOL (within the SQL script) to /the/same/place ? /this/is/an/illegal/filename


SP2-0333: Illegal spool file name: "/home/oracle/IFSTtoIFSD/IFSD.log
# Start log file" (bad character: ' ')
SP2-0306: Invalid option.


Unix script:
set ORACLE_SID=IFSD; export ORACLE_SID
sqlplus /nolog @/home/oracle/IFSTtoIFSD/shutdownIFSD.sql


The SQL script is:
spool /home/oracle/IFSTtoIFSD/IFSD.log
connect internal
select * from v$database;
spool off;
exit
 
What do you need all that. On UNIX just try
Code:
sqlplus /nolog @/home/oracle/IFSTtoIFSD/shutdownIFSD.sql
 > output.log
Gives you the flexibility to write a proper shell file as well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top