I'm trying to run an executable with dbms_scheduler.create_job. Nothing happens and the process just hangs. This is my code:
execute dbms_scheduler.create_job('TEST7', 'EXECUTABLE', 'c:\Oracle\Ora81\BIN\RWRUN60.EXE report=C:\prod\Packsheets.rep userid=userid/password@connect_string desformat=PDF', 0, NULL, NULL, NULL, 'DEFAULT_JOB_CLASS', TRUE, TRUE, NULL);
My OS is Windows XP Service pack1. Oracle db 10g.
I am running 10g on Windows XP to assess functionality, and I also experienced the same thing trying to set up an EXECUTABLE JOB through the EM Control. Same Syntax in the SQL call for DBMS_SCHEUDLER.CREATE_JOB.
The job (a simple .exe batch file to connect through SQLPlus and create an object in the database) fails every time. It can be run from the command line with no problems.
Where did you set batch=yes?
Did you ever get the executable script to run completely as a job?
are you getting the error
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
job_name => 'TEST',
job_type => 'EXECUTABLE',
job_action => 'c:\list.bat > nul',
enabled => false,
comments => 'Testing Executable',
auto_drop => false);
with the '> nul' added this error disappears
What we discovered was that we had to add some parameters (at the bottom of the job creation page -- advanced).
'script_dir and filename > nul' (note: one 'L'; not 'null' in Windows)
Here is an extract from a metalink search on bug 3824718
5 job_type=>'executable', enabled=>false);
Best of luck,
I have the same problem and tried to follow your recommendations but it doesn't work.
I have a batch run.bat which contains this
c:\windows\system32\cmd.exe /c f:\demo\load_critical.bat > nul
NB : My batch file for example copy a file. that's all.
And I create the following job :
I've always received the same error ORA-27369 as mentionned above even if I put > null in the job directly.
I use RDBMS 10.1.0.3 on Windows Server 2003 Platform Intel 64Bits.
Thank you for your help.
Did you put in the parameters?:
as well as the batch job?
I noticed you had the /c in the batch job line. What if you take it out, and make it a parameter along with /q.
Best of luck.