Home » RDBMS Server » Server Administration » solution pl... 10g oracle scheduler + shell script
solution pl... 10g oracle scheduler + shell script [message #249649] Thu, 05 July 2007 07:52 Go to next message
annegrace1
Messages: 5
Registered: July 2007
Location: chennai
Junior Member
hi..

here i wrote a code ... where it calls the ksh file and runs for everyone minute.
this shell script ll invoke a sql file and a record ll be inserted.

its getting compiled properly....
but the record is not getting inserted

help me out asap


begin
dbms_scheduler.create_job
(
job_name => 'test_shell_ann_test4',
job_type => 'EXECUTABLE',
job_action => '/home/oracle/avalon_dev/shell/create_snapshot_mv_account_deposits.ksh',
start_date => '05-JUL-2007 01:38:00 PM',
repeat_interval => 'FREQ=MINUTELY; INTERVAL=1',
enabled => true,
comments => 'Move Archived Logs to a Different Directory'
);

DBMS_SCHEDULER.ENABLE('test_shell_ann_test4');
end;
/
Re: solution pl... 10g oracle scheduler + shell script [message #249657 is a reply to message #249649] Thu, 05 July 2007 08:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe the script is wrong. Who knows?

Regards
Michel
Re: solution pl... 10g oracle scheduler + shell script [message #249659 is a reply to message #249657] Thu, 05 July 2007 08:10 Go to previous messageGo to next message
annegrace1
Messages: 5
Registered: July 2007
Location: chennai
Junior Member
this is th eksh file


#!/bin/ksh
cd /home/oracle/avalon_dev/sql
sqlplus gib_admin/gibdev@avalon.gibdev << !
@test.sql;
!
Re: solution pl... 10g oracle scheduler + shell script [message #249661 is a reply to message #249649] Thu, 05 July 2007 08:13 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


http://babudba.blogspot.com/search/label/DBMS_SCHEDULER
Re: solution pl... 10g oracle scheduler + shell script [message #249664 is a reply to message #249661] Thu, 05 July 2007 08:21 Go to previous messageGo to next message
annegrace1
Messages: 5
Registered: July 2007
Location: chennai
Junior Member
Babu,

thanks for the information.. its useful... but i need to know how to call a shell script not a PL SQL... i ve attached the code in my previous message... kindly check it out and let me its correct or not
Re: solution pl... 10g oracle scheduler + shell script [message #249667 is a reply to message #249659] Thu, 05 July 2007 08:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe your SQL script is wrong. Who knows?

Regards
Michel
Re: solution pl... 10g oracle scheduler + shell script [message #249753 is a reply to message #249667] Thu, 05 July 2007 14:58 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Crontab is utility for running your scripts.
Then why you using oracle to run the shell script??
Re: solution pl... 10g oracle scheduler + shell script [message #249805 is a reply to message #249649] Thu, 05 July 2007 23:40 Go to previous messageGo to next message
annegrace1
Messages: 5
Registered: July 2007
Location: chennai
Junior Member
Any idea about this error.
ORA-27370: job slave failed to launch a job of type EXECUTABLE
Re: solution pl... 10g oracle scheduler + shell script [message #249806 is a reply to message #249649] Thu, 05 July 2007 23:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
So why didn't you post the error code in the 1st post?

27370, 00000, "job slave failed to launch a job of type EXECUTABLE"
// *Cause: The scheduler ran into an error when the job slave tried to start
//         a job of type EXECUTABLE. The rest of the error stack will provide
//         more detailed information on what the exact problem was.
// *Action: Correct the problem specified in the error stack and reschedule
//          the job.


What else have you NOT shared with us?

[Updated on: Thu, 05 July 2007 23:45] by Moderator

Report message to a moderator

Re: solution pl... 10g oracle scheduler + shell script [message #249813 is a reply to message #249649] Fri, 06 July 2007 00:13 Go to previous messageGo to next message
annegrace1
Messages: 5
Registered: July 2007
Location: chennai
Junior Member
But actually... i ve scheduled the ksh file only once and the table or the ksh file is not used by any other jobs.

not clear with the error given
Re: solution pl... 10g oracle scheduler + shell script [message #249814 is a reply to message #249649] Fri, 06 July 2007 00:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Without additional clues, You're On Your Own (YOYO)!
Re: solution pl... 10g oracle scheduler + shell script [message #250394 is a reply to message #249649] Mon, 09 July 2007 22:10 Go to previous message
mrfred8
Messages: 3
Registered: July 2007
Location: chicago
Junior Member
We bailed on using the schedule for these types of jobs. If you have a job you want to run every minute running a shell script, cron is a much better option , IMO. man cron

Good Luck,

http://oraclebooks.org
Previous Topic: Preventing programmer changing data
Next Topic: Auto start oracle
Goto Forum:
  


Current Time: Fri Sep 20 09:43:56 CDT 2024