Creating Oracle job

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating Oracle job

Arsalan
Hello Arsalan,

by creating oracle job it give error the details like below

Kindly guide me

window 2008
Oracle 11G R2
----------
Begin
  Dbms_Scheduler.Drop_Job (Job_Name => 'DAILY_BACKUP');
END;
/

------For credential I give os user name and password

begin
 dbms_scheduler.create_credential(
 credential_name => 'EXTERNAL_JOB',
 username => 'arsala',
 password => 'aone#13.af');
end;
/

 BEGIN
       DBMS_SCHEDULER.CREATE_JOB
       (
       job_name           => 'DAILY_BACKUP',
       job_type            => 'EXECUTABLE', --'PLSQL_BLOCK',
       job_action          => 'c:\backup.bat',
       number_of_arguments => 0,
       start_date          => SYSTIMESTAMP,
       repeat_interval   =>'FREQ=DAILY; BYDAY=SAT,SUN,MON,TUE,WED,THU; BYHOUR=22',
       end_date           => NULL,
       enabled             => TRUE,
       auto_drop          => FALSE,
       credential_name => 'EXTERNAL_JOBS',
       comments          => 'This job is used to tranfer updated data from prod db to dwh db every day 10 PM exclude friday'
       );
 END;
/

begin
    dbms_scheduler.run_job(job_name=>'DAILY_BACKUP',USE_CURRENT_SESSION=>true); -- true is default
end;
/

ORA-27369: job of type EXECUTABLE failed with exit code: The storage control blocks were destroyed.
ORA-06512: at "SYS.DBMS_ISCHED", line 185
ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
ORA-06512: at line 2

Rman script path backup.bat

Reply | Threaded
Open this post in threaded view
|

Re: Creating Oracle job

ErmanArslansOracleBlog
Administrator
Hi,

please check the following documents:

Scheduled Job fails with ORA-27369 with exit code: The storage control blocks were destroyed (Doc ID 1674713.1)
Scheduled Job Of Type EXTERNAL_SCRIPT Fails With ORA-27369 On Windows (Doc ID 2065024.1)