Script to check Oracle instance status

A small shell script to check instance status of oracle database.

$vi instanceup.sh

#!/bin/sh
SERVICE=’ora_pmon_orcl’
#replace ‘orcl’ with your sid

if ps -ef | grep -v grep | grep $SERVICE > /dev/null
then
echo “$SERVICE service running, everything is fine”
else
echo “$SERVICE is not running”
fi

$./instanceup.sh

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s