-
Regarding DBMS_SCHEDULER
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
-
try task scheduler on windows dear, its easier
Behind The Success And Failure Of A Man Is A Woman
-
Originally Posted by yxez
try task scheduler on windows dear, its easier
thanx 4 ur prompt response but i want to try it with dbms_scheduler
can u help me in this regard dear Sir!!!!!!!!!!!!!
-
-
is the server process running (its a service) OracleJobScheduler
-
Originally Posted by davey23uk
is the server process running (its a service) OracleJobScheduler
yes its running
-
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 runnin
What happens?
Error number, trace file, anything?
-
Originally Posted by Bore
What happens?
Error number, trace file, anything?
No error in alert log but no output about running the job
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|