We want to use Windows Task Scheduler to schedule and execute several DB jobs using a .bat file. The DB is Oracle. A sql query needs to be scheduled to run twice a day to create and populate a temp table, then 3 Csystal reports need to be run getting data from the temp table. The sequence is:
1. Run SQL script to create and populate the staging table;
2. Run report A when the staging table is created and populated; ie. the report can't be run until it receveid the status of the SQL script is completed;
3. Refreshed/repopulated the staging table when repot A is completed. ie. upon receiving the status of the report is compelted;
4. Run report B when receveid the status of the SQL script is completed;
5. Run reprot C when receveid the status of the report B is completed.
I created a .bat file to exec. the sql file successfully when I ran it in my local drive.
However, when I ran it in the server I first got the SP2-0333 "bad character" error. It was caused by the space in the server path. So I changed the .bat file to the following:
subst g: "C:\Program Files\Crystal Decisions\Enterprise 9\win32_x86"
sqlplus pinprd/pintst_pin05@xm_pintst @"C:\Program Files\Crystal Decisions\Enterprise 9\win32_x86\AT_Sql.sql"
Now I get the SP2-0332 error: cannot create spool file.
I can't change the space in the path as that's what the server path is, and the spool file can't be place anywhere else as it will be used there.
Is there any work around?