Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scheduler Job Failes with "Incorrect function" error

632013Jul 23 2009 — edited Jul 27 2009
hi experts,

This is 10.2.0.4 on Windows

I'm trying to build a simple little scheduler job to run an RMAN backup of my database. Not so easy for a newbie.
Somewhere I read that the job_action has to be Cmd.exe and your .bat file is specified in a job_argument, so that's what I've attempted to do - see below.

begin
dbms_scheduler.create_job('BACKUPWHOLE2',
job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE',
number_of_arguments=>3,
job_type=>'executable', enabled=>truee);
dbms_scheduler.set_job_argument_value('BACKUPWHOLE2',1,'/q');
dbms_scheduler.set_job_argument_value('BACKUPWHOLE2',2,'/c');
dbms_scheduler.set_job_argument_value('BACKUPWHOLE2',3,'C:\JobScripts\BackupWhole.bat');
dbms_scheduler.enable('BACKUPWHOLE2');
end;
/

The .bat file looks like this:

set oracle_sid=ultraprd;
rman connect target sys/pncl08UM@ultraprd @C:\JobScripts\BackupWhole.txt

The .txt file looks like this:

RUN {
Backup Database Plus Archivelog;
}
EXIT;


When I run the job it fails with
"ORA-27369 job of type EXECUTABLE failed with exit code: Incorrect function"

Sorry but I am totally lost.

Thanks, John
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2009
Added on Jul 23 2009
2 comments
4,209 views