Showing posts with label oracle status. Show all posts
Showing posts with label oracle status. Show all posts

Wednesday, 19 February 2014

Checking Oracle Connection Status Using Shell Script

We can check the oracle status in a number of ways using shell script.

I am mentioning one of the ways to check the connectivity,

Whenever we connect to oracle database successfully, then it will produce success message which contains "Connected to" as sub-string, i am checking for this string using grep command


  if sqlplus schemaname/password@databasename < /dev/null | grep 'Connected to'; then

      echo "Database Connection is OK .......Starting Export Process ...."

 else
  
      echo "Database Connection is not successful .." 

      exit;