Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Daily SQL Update Statement Execution

Re: Daily SQL Update Statement Execution

From: Doug O'Leary <dkoleary_at_mediaone.net>
Date: Wed, 15 Mar 2000 08:39:32 -0600
Message-ID: <MPG.13395ca065af29c198974d@nntp.ce.mediaone.net>


In article <v4Mz4.1256$kv6.71320_at_newsread1.prod.itd.earthlink.net>, mprovost_at_liquidgolf.com says...
> I need to run an update sql statement once a day. How can I automate this?

If you're using UNIX, the following should do the trick;

vi ~/bin/my_script # Create $HOME/bin/my_script # Source your profile
. /home/my_userid/.profile

sqlplus << EOF
connect my_oracle_id/my_oracle/pwd
<< Remaining sql commands >>
exit
EOF
### end my_script
# Ensure script is executable
chmod 755 ~/bin/my_script
# Edit your crontab
crontab -e
0 0 * * * /usr/bin/ksh /home/my_userid/bin/my_script ### end

--



Douglas K. O'Leary
Senior System Admin
dkoleary_at_mediaone.net
Received on Wed Mar 15 2000 - 08:39:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US