Re: SPOOL INTO A JOB

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 11 Sep 2008 14:51:15 -0800
Message-ID: <48c992d3$1@news.victoria.tc.ca>


CenturionX (darwinbaldrich_at_gmail.com) wrote:
: Hello Sybrand,

: Thanks for respond.
: I'll change the question.

: I'm working with Oracle 10.2.0.4.0 on Windows.

: I created a job to execute a .bat file

: JOB:
: ---------
: begin
: dbms_scheduler.create_job (
: job_name =>'DEL_ALERT_LOG',
: job_type =>'executable',
: job_action =>'c:\windows\system32\cmd.exe /c H:\Reports\Programs
: \wip_inventory_dbp.bat > nul',
: enabled => true,
: auto_drop => true
: );
: commit;
: end;
: /

: .BAT file
: -------------
: ::DELETE OLD LOG FILE
: DEL wip_inventory_dbp.log

: ::GENERATE REPORT
: ECHO. >> wip_inventory_dbp.log
: ECHO Generating report... >> wip_inventory_dbp.log
: ECHO. >> wip_inventory_dbp.log
: sqlplus cms/cms_at_LEGACY_JACKSONVILLE_DEV @H:\Reports\Programs
: \wip_inventory.sql

: The only thing that executes right is the sqlplus command, The rest:
: del, echo, doesn't work (just DOS commands does nothing).
: How can i fix it.
: I need a log file to follow the process and i need to add more dos
: commands in the script.

: Thanks for your help.

I would guess that the bat file needs to set a useable current directory before trying to run the commands. If the Reports dir was a good location (which I doubt, but what the heck) then something like

	::DELETE OLD LOG FILE
	H:
	chdir H:\Reports\Programs
	DEL wip_inventory_dbp.log
	...etc...
Received on Thu Sep 11 2008 - 17:51:15 CDT

Original text of this message