crontab for sql script
Hi,I need set crontab for script below, but the crontab don't run for script. Can you help me!
script clear_sniped.sh with content:
touch /usr/oracle/clearsniped.log
tmpfile=/usr/oracle/clearsniped.log
sqlplus /nolog << EOF
connect hcmpmd/DBa#123456qwe
spool $tmpfile
select p.spid from v\$process p,v\$session s
where s.paddr=p.addr
and s.status='SNIPED';
spool off
EOF
for x in `cat $tmpfile | grep "^[0123456789]"`
do
kill -9 $x
done
rm $tmpfile
Thanks
DuyPM
0