Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking Oracle

Status
Not open for further replies.

jprabaker

Technical User
May 31, 2001
185
GB
I'm running oracle v8.1.7 on AIX 4.3.3. I'm trying to write a script to check if oracle is running but my DBA does not know of a fool proof way to determine if oracle is up or not. I've suggested checking the number of processes but this is not fool proof.

Can anyone offer any suggestions??

John
 
Generally speaking if a ps -ef | grep command for ora_pmon_<INSTANCE>, ora_reco_<INSTANCE> ora_smon_<INSTANCE>, ora_lgwr_<INSTANCE> and ora_ckpt_<INSTANCE> comes back successfully, your database should be up and running. It's also best to check whether the listener is OK with a ps -ef | grep tnslsnr or similar.

There are other more sophisticated tools - have a look at:


which although dedicated largely to Oracle on Solaris, should give you some pointers. HTH.
 
John, further info:

tomecki24 (Tomaz) posted this in the Oracle 8i forum:

Hello,

I found on other forum script, that matches my request:
ps -ef | grep &quot;ora_smon_$ORACLE_SID&quot; |grep -v &quot;grep&quot; > /dev/null
if [ &quot;$?&quot; -ne 0 ]
then
echo &quot;`date '+%T %m/%d/%Y'` : Database $ORACLE_SID not running on `uname -n`.&quot;
exit 1
fi

Hope this goes someway to fulfilling your requirement. Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top