DBMS_SCHEDULER Problem [message #208564] |
Mon, 11 December 2006 06:00 |
M.Shakeel Azeem
Messages: 226 Registered: September 2006
|
Senior Member |
|
|
I am trying to schedule a export a test schema by using batch file which contains the following entry in 10g Win2000 environment
expdp system/gateway dumpfile=expfile:test.dmp schemas=test logfile=expfile:log1.log
i want to schedule the job by dbms_scheduler
begin
dbms_scheduler.create_job
(
job_name => 'JOB1',
job_type => 'EXECUTABLE',
job_action => 'c:\backup.bat',
enabled => true,
start_date => trunc(sysdate,'HH'),
repeat_interval =>'FREQ=HOURLY;interval=1',
comments => 'Run shell-script'
);
end;
i got the Error
ORA-12012: error on auto execute of job 53318
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
then i tried the following
begin
dbms_scheduler.create_job
(
job_name => 'JOB1',
job_type => 'EXECUTABLE',
job_action => 'c:\backup.bat>nul',
enabled => true,
start_date => trunc(sysdate,'HH'),
repeat_interval =>'FREQ=HOURLY;interval=1',
comments => 'Run shell-script'
);
end;
The error is disappeared but the job is still not running and then i tried the following
begin
dbms_scheduler.create_job
(
job_name => 'JOB1',
job_type => 'EXECUTABLE',
job_action => 'c:\windows\system32\cmd.exe /c c:\backup.bat>nul',
enabled => true,
start_date => trunc(sysdate,'HH'),
repeat_interval =>'FREQ=HOURLY;interval=1',
comments => 'Run shell-script'
);
end;
Errors in file d:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j000_2132.trc:
ORA-12012: error on auto execute of job 53369
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:accessing execution agent failed with status: 233
ORA-27301: OS failure message: No process is on the other end of the pipe.
ORA-27302: failure occurred at: sjsec 9
ORA-27303: additional information: No process is on the other end of the pipe.
I had also tried this
begin
dbms_scheduler.create_job('test_job',
job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE',
number_of_arguments=>3,
job_type=>'executable', enabled=>false);
dbms_scheduler.set_job_argument_value('test_job',1,'/q');
dbms_scheduler.set_job_argument_value('test_job',2,'/c');
dbms_scheduler.set_job_argument_value('test_job',3,'c:\backup.bat');
dbms_scheduler.enable('test_job');
end;
i had tried all the possibilities but still not succeeded
i am hopful to get the solution by putting the query on this forum
Can anybody help me in this regard
Thanx in advance
|
|
|
Re: DBMS_SCHEDULER Problem [message #208609 is a reply to message #208564] |
Mon, 11 December 2006 09:20 |
tahpush
Messages: 961 Registered: August 2006 Location: Stockholm/Sweden
|
Senior Member |
|
|
Try something like this and see if you still have the same problem
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'cmd_test',
job_type => 'executable',
job_action => 'C:\WINNT\SYSTEM32\cmd.exe /c dir c:\ > c:\test.out',
start_date => systimestamp,
enabled => true
);
end;
/
[Updated on: Mon, 11 December 2006 09:21] Report message to a moderator
|
|
|
|
|
|
Re: DBMS_SCHEDULER Problem [message #209009 is a reply to message #208609] |
Tue, 12 December 2006 22:39 |
M.Shakeel Azeem
Messages: 226 Registered: September 2006
|
Senior Member |
|
|
tahpush wrote on Mon, 11 December 2006 09:20 |
Try something like this and see if you still have the same problem
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'cmd_test',
job_type => 'executable',
job_action => 'C:\WINNT\SYSTEM32\cmd.exe /c dir c:\ > c:\test.out',
start_date => systimestamp,
enabled => true
);
end;
/
|
can u give me explaination about c:\test.out'
Sorry i was unable to understand
Best Regards,
|
|
|
Re: DBMS_SCHEDULER Problem [message #209047 is a reply to message #209009] |
Wed, 13 December 2006 01:27 |
tahpush
Messages: 961 Registered: August 2006 Location: Stockholm/Sweden
|
Senior Member |
|
|
if you run commandprompt
go to c:\windows\system32\
and type "dir" you get a list of all the files and folder
that will go into the test.out file
|
|
|