Link to home
Start Free TrialLog in
Avatar of sath350163
sath350163

asked on

DBMS SCHEDULER job fails with "The system cannot find the file specified" error

I got the following code from:
https://forums.oracle.com/forums/thread.jspa?messageID=2737501&tstart=0

This job fails with the following error:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
STANDARD_ERROR="The system cannot find the file specified."


I'm running the above code in Oracle 10g Express edition.
The OracleJobSchedulerXR is running.
The test.bat file does exist in c:\temp\test.bat.

Is it due to some sort of permission issue?

Thanks!


BEGIN
 
sys.dbms_scheduler.create_job( 
 
job_name => 'testjob',
 
job_type => 'EXECUTABLE',
 
job_action => 'C:\WINDOWS\system32\cmd.exe',
 
repeat_interval => 'FREQ=WEEKLY;BYDAY=MON,TUE,WED,THU,FRI;BYHOUR=21;BYMINUTE=45;BYSECOND=0',
 
--start_date => systimestamp at time zone 'US/Eastern',
 
job_class => 'DEFAULT_JOB_CLASS',
 
comments => 'test job',
 
auto_drop => FALSE,
 
number_of_arguments => 3,
 
enabled => FALSE);
 
sys.dbms_scheduler.set_job_argument_value( job_name => 'testjob', argument_position => 1, argument_value => '/q'); 
 
sys.dbms_scheduler.set_job_argument_value( job_name => 'testjob', argument_position => 2, argument_value => '/c'); 
 
sys.dbms_scheduler.set_job_argument_value( job_name => 'testjob', argument_position => 3, argument_value => '"c:\temp\test.bat"'); 
 
sys.dbms_scheduler.enable( 'testjob' ); 
 
END;

Open in new window

Avatar of sweetfa2
sweetfa2
Flag of Australia image

What happens if you change

_name => 'testjob', argument_position => 3, argument_value => '"c:\temp\test.bat"');

to

_name => 'testjob', argument_position => 3, argument_value => 'c:\temp\test.bat');
Avatar of sath350163
sath350163

ASKER

I tried that and it still gives the same error.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of sweetfa2
sweetfa2
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial