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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking that DB up from remote Unix box

Status
Not open for further replies.

msc0tt

IS-IT--Management
Jun 25, 2002
281
CA
Hello,
I wish to have a simple script on my primary Unix server (no Oracle) that checks to see if my Oracle server is up and responding.
Initially, I was going to use Perl with DBI/DBD, but this is getting more complicated as I go. There is MUCH setup required on the non-Oracle server for this to work.

My thought is telneting to the listener port (1521) on the Oracle host, and using a 'chat'-type script to get the DB status. Could something like this work? Any tips welcomed.

-with thanks
 
The easiest wasy would be to ssh or rsh to execute the TNSping on a remote machine that has the client and return the result.

Another way would be to set up a web server that
has the libraries and can contact oracle (the Apache that
comes with oracle comes to mind) and use it to test the
database connection with SOAP or some other web service
language.

A third way would be to put the oracle client libraries
on NFS, then any machine can have oracle access as long
as they have access to the share. Just put a shell script
on the box that sets oracle home and the other env vars to wherever you mount the share at.

I would only try to reverse engineer SQLnet as a last
resort. If you want to do that, then I suggest you truss
a TNSping to see what system calls are being made to
contact the database and that you use a sniffer to watch
the traffic that is sent to 1521 and the reply back. .
.. Eat, think and be merry .
... ....................... .
 
TNSPING only verifies the listener process is up not the database.

The best way to verify the database is working is to log into it

Alex
 
Listener also may be stopped :) Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top