K
K
Kvert0072014-02-10 15:18:26
Oracle
Kvert007, 2014-02-10 15:18:26

How to execute a Windows OS command in job oracle?

Hello! Tell me how to execute the following Windows command in job oracle

C:\windows\system32\cmd.exe /C java -classpath "c:\ojdbc6.jar;c:\projectjava.jar" Class1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mrstrictly, 2014-02-10
@mrstrictly

And what exactly is the difficulty?
Here, for example: citforum.ru/database/oracle/scheduler

K
Kvert007, 2014-02-10
@Kvert007

Here is the code I am using.

BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name            => 'test2',
job_type            => 'EXECUTABLE',
job_action            => 'cmd.exe',
start_date=>to_date('10.02.14 14:25', 'dd.mm.yy hh24:mi'),
repeat_interval=>'FREQ=MINUTELY;INTERVAL=2'
--number_of_arguments => 1
);
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name          => 'test2',
argument_position => 1,
argument_value    => 'java -classpath "c:\ojdbc6.jar;c:\projectjava.jar" Class1'
);
DBMS_SCHEDULER.ENABLE('test1');
END;

but when execute dbms_scheduler.run_job('TEST2');
error
Error report:
ORA-27370: slave process failed while starting job of type EXECUTABLE
ORA-27300: OS operation failed: accessing job scheduler service with status: 2
ORA-27301: OS error message: � ������� �.
ORA-27302: failed at: sjsec 6a
ORA-27303: additional info: � ��������.
ORA-06512: on "SYS.DBMS_ISCHED", line 185
ORA-06512: on "SYS.DBMS_SCHEDULER", line 486
ORA-06512: on line 1
27370. 00000 - "job slave failed to launch a job of type EXECUTABLE"
* Cause: The scheduler ran into an error when the job slave tried to start
a job of type EXECUTABLE. The rest of the error stack will provide
more detailed information on what the exact problem was.
*Action: Correct the problem specified in the error stack and reschedule
the job.
due to coding I can't understand the error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question