Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> [C.D.O.S] 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:
-- cr_job10.sql 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 Instance name: orcl Redo thread mounted by this instance: 1 Oracle process number: 15 Unix process pid: 22396, image: oracle_at_sol (J000)Received on Fri Sep 07 2007 - 04:00:16 CDT
*** ACTION NAME:(MY_BACKUP_JOB) 2007-09-06 17:33:00.175
*** MODULE NAME:(DBMS_SCHEDULER) 2007-09-06 17:33:00.175
*** SERVICE NAME:(SYS$USERS) 2007-09-06 17:33:00.175
*** CLIENT ID:() 2007-09-06 17:33:00.175
*** SESSION ID:(140.13520) 2007-09-06 17:33:00.175
*** 2007-09-06 17:33:00.175
ORA-12012: error on auto execute of job 53267 ORA-27369: job of type EXECUTABLE failed with exit code: 274662 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
![]() |
![]() |