Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Backup script giving error when run by cron
How are you running the .profile??
Try to give full path of .profile file e.g.
. /u03/app/oracle/816/.profile
Here make sure that your .profile file doesn't call another shell (like ksh -o emacs).
Another alternative is to give the full path alongwith command name e.g.
/u03/app/oracle/816/bin/svrmgrl << !
connect internal
shutdown immediate
startup
shutdown normal
!
HTH,
Rajesh
-----Original Message-----
manivannan_m_at_indya.com
Sent: Friday, July 20, 2001 10:25 AM
To: Multiple recipients of list ORACLE-L
Hi Gurus,
Posting again..
Actually the .profile runs thro okay.. But the svrmgrl command given in the shutdown script doesn't run.. It says svrmgrl - not found. I'm running the cron from the dba user. But still the environment is not set. What should I do??
thanks in advance,
Manivannan.M
Sent: Wed, 18 Jul 2001 23:40:30 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
Hi gurus,
Our database is running on Dynix in a Sequent machine.
I tried to put the startup/shutdown script we use in crontab and
schedule it.
I call a script shut.sh which in turn will call the shutdown.sh
script. But it gives me an error saying svrmgrl- not found. I've
given here those scripts..
What am I missing??
This shut.sh is called by the cron
shut.sh
shutdown.sh
ORACLE_SID=TBMS
export ORACLE_SID
INITIAL_STATUS=`ps -ef|grep "ora_[a-z]*_TBMS"|wc -l`
echo $INITIAL_STATUS
if [ $INITIAL_STATUS != 0 ]; then
svrmgrl <<EOF connect internal alter system switch logfile; shutdown immediate; exit
DB_STATUS=`ps -ef|grep "oracleTBMS"` if [ -n $DB_STATUS ]; then echo "Starting up the database in restrict mode" svrmgrl <<EOF connect internal startup restrict; shutdown ; exit
echo "Database TBMS shutdown" else echo "Error in shutting down database" exit fi
echo "Database is already shutdown..exiting"
exit
fi
regards,
Manivannan.M
Enjoy being an Indyan at http://www.indya.com
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: manivannan_m_at_indya.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ---- End Included Message ---- Enjoy being an Indyan at http://www.indya.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: manivannan_m_at_indya.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rajesh Dayal INET: Rajesh_at_ohitelecom.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Sat Jul 21 2001 - 00:45:44 CDT
![]() |
![]() |