How to execute SQL script from a command line file?


I'm starting to generate nightly reports but get problems executing SQL
script from a command file that is scheduled to run at night.  I'm running
NT 4(sp3) and 7.3.3 I'm trying something like :

AT batchjob /interactive 21:00

The batchjob file contains:
rem
rem create nightly reports
rem
SET ORACLE_HOME=C:\ORANT
SET ORACLE_SID=LIVE
cd C:\ORANT\REPORTS
svrmgr23
user/pass@instance;
@GenerateReports;
exit



Ans:
You can use SQL*PLUS instead of Server Manager:
plus33 -s user/pass@SID @<Script>

<Script> is your sql script, which contains EXIT at the end.
 
 

Hosted by www.Geocities.ws

1