Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is the database server on the local machine?

Re: Is the database server on the local machine?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 2 Dec 2004 15:25:05 -0800
Message-ID: <92eeeff0.0412021525.629991af@posting.google.com>


the_bitbucket_at_canada.com (Lenny Palozzi) wrote in message news:<2151c418.0412020954.4a0fd0ae_at_posting.google.com>...
> That's good news. At least the information is readily available, but
> the suggestions so far are for after the connection is made the
> server. I'd really like to be able to obtain the Oracle server's
> hostname and/or ip address before making the connection. Is there a
> way to reliably do this?
>
> ~Lenny

If you have the service name handy then, a) you can locate and parse the tnsnames.ora file.... Messy. b) You can parse the returned string from call to tnsping <service name>. It lists (HOST=<Host Name>) if protocol is TCP.... a bit simpler and easier.

Don't know how else you can get it.

Regards
/Rauf Received on Thu Dec 02 2004 - 17:25:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US