Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBMS_SCHEDULER

Status
Not open for further replies.

RedNoseXXL

Programmer
Nov 5, 2008
2
0
0
DE
Hi, I have a problem with create_Job. I've wrote a little block:
begin
DBMS_SCHEDULER.CREATE_JOB(job_name => 'run_batch',
job_type => 'executable',
job_action => 'c:\windows\system32\cmd.exe /c c:\Test.bat',
enabled => true,
auto_drop => true);
commit;
end;

This block works fine and the directory was created.

So I write a new block where I tried to execute a little script:
begin
DBMS_SCHEDULER.CREATE_JOB(job_name => 'run_batch',
job_type => 'executable',
job_action => 'c:\windows\system32\cmd.exe /c c:\Test.bat',
enabled => true,
auto_drop => true);
commit;
end;

This will not work. Oracle executes the block without an error but the Test.bat was not executed.

Can anybody help me?

Kind regards
Alex
 

To execute a job maybe you should use the DBMS_SCHEDULER.RUN_JOB procedure.
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Hi LKBrwnDBA,

thanks for your reply. I've tried it yesterday with DBMS_SCHEDULER.RUN_JOB but with the same result. The Batch file was not executed.

Can it be, that this is a problem with a missing privilege? Maybe the Oracle User has no right to execute a program?

Kind regards
Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top