script to check DB status
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: script to check DB status

  1. #1
    Join Date
    Apr 2001
    Posts
    257

    script to check DB status

    Platform: Oracle 9.R2 on Solaris 8

    I need to write a (Perl) script to check whether a DB on a different Solaris server on the same LAN is down. My question is what condition do I specify to check the DB? For example, if the DB is down like it was shutdown or hang for whatever reason, what criteria to check when this happens? If it hangs, when I make a connection, it won't return. Do I have to spawn a seperate process in the script which attempts to make a connection to the DB while the other process checks whether the spawned process returns? This sounds an overkill to me. There gotta be an easy way.

    How do people usually do this?

    Thanks,

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Well there are several things you can do.
    You can grep the pmon process to check back ground processes are running. Also you can go into sqlplus and check the status in v$instance;

    HTH
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    If I can connect, the database is up. Simply connect to the database using DBI/DBD. If connected, sleep for 300 seconds. If not connected, send email/page and sleep for 300 seconds.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width