Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> How I run a shell script from the scheduler on 10.2.0.2.0 ?
Hello Oracle People,
I'd like to run a shell script from the Scheduler in my 10g database.
Right now it is a simple shell script.
Eventually it will wrap RMAN commands to back up my DB.
I wrote a simple pl/sql script to create a job:
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_backup_job', job_type => 'EXECUTABLE', job_action => '/h/oracle/scripts/tst.sh', start_date => '06-SEP-07 5.33.00PM US/Pacific', repeat_interval => 'FREQ=DAILY', end_date => '08-SEP-07 4.00.00PM US/Pacific', enabled => TRUE, comments => 'My Backup Job');END;
I see no errors when I run the above procedure.
I checked DBA_SCHEDULER_JOBS and the job is in there.
The scheduler, though, errors out with an error which I see in a trace file:
/h/oracle/admin/orcl/bdump/orcl_j000_22396.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /h/oracle/product/10r2
System name: SunOS
Node name: sol Release: 5.10 Version: Generic_118855-14 Machine: i86pc
I googled on this:
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
Google returned only 1 hit.
There, I see some evidence that I need to configure something inside of Oracle to run shell scripts from the scheduler, but possibly just for machines running windows. I'm running Solaris.
Do any of you know what I need to configure inside of Oracle to run shell scripts from the scheduler?
-Owen
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Sep 07 2007 - 03:56:26 CDT