If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > shell scripts to execute stored procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-02, 03:28
samasamajam samasamajam is offline
Registered User
 
Join Date: Dec 2002
Posts: 2
shell scripts to execute stored procedures

Hi all

could someone plss suggest the differant ways in which, scheduling of Shell Scripts which execute database(oracle8.1.7) stored procedures, is possible in a sun solaris server or unix.
The shell scripts and the stored procedures should be triggered at specified intervals of time.
Plss elaborate as to how this can be done using cron jobs and Control-M in particular
Reply With Quote
  #2 (permalink)  
Old 02-27-03, 07:26
thebap thebap is offline
Registered User
 
Join Date: Feb 2003
Posts: 45
Thumbs up Example

use a cronjob to execute a script like the one below :-

==%<=====================================
#!/usr/bin/sh
### Analyze the FRED schema
###

ORACLE_HOME=/oracle8i/app/oracle/product/817
PATH=/oracle8i/app/oracle/product/817/bin:$PATH
ORACLE_SID=FREDDB
export ORACLE_HOME PATH ORACLE_SID
$ORACLE_HOME/bin/sqlplus '/ as sysdba' << EOF
execute dbms_stats.gather_schema_stats ownname=>'FRED',cascade=>TRUE);
EOF
==%<=====================================

Ensure that you set ORACLE_HOME,PATH & ORACLE_SID as running from a CRON does not provide you with these by default !!!

Gud Luk
Reply With Quote
  #3 (permalink)  
Old 03-19-03, 04:55
kazooka kazooka is offline
Registered User
 
Join Date: Mar 2003
Posts: 3
Re: shell scripts to execute stored procedures

Do you have any idea as to how i would do a multiline replacement in sed
Reply With Quote
  #4 (permalink)  
Old 03-19-03, 05:00
thebap thebap is offline
Registered User
 
Join Date: Feb 2003
Posts: 45
multiline replace in Sed

Yes thanks I do.

But why ask this within an ORACLE forumn ?????


sed 's/<search>/<replace>/g'

NB: g means global - default is for the current line ....

If you need UNIX scripting help then try a UNIX site.
Reply With Quote
  #5 (permalink)  
Old 03-19-03, 05:06
kazooka kazooka is offline
Registered User
 
Join Date: Mar 2003
Posts: 3
Post Re: multiline replace in Sed

Sorry bout that

But just one last question plz.

I need to replace
CALL "ABC"
with

CALL "OBE"
DISPLAY "hello"

without overwriting and i cant seem to get it done.
plz
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On