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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Challenge for experts!!!!!!!!!!!!!!

Re: Challenge for experts!!!!!!!!!!!!!!

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 20 Dec 2000 23:05:35 +0100
Message-ID: <91rb74$4raha$3@ID-62141.news.dfncis.de>

Still scratching my head.

Alternatives:
tnsping <servicename>
This is not going to work as it checks for the existence of a listener *only*. Of course it is going to work if you can be sure the listener will start only when the database has started, which isn't necessarily true.

Checking the existence of the service on a remote system. This would require administrative privileges and parsing tnsnames.ora and will work in NT only.

So it looks like you need to connect (and exit immediately and do this with sqlplus -s)

There is a different generic solution though *from the dba perspective*

Install Oracle Enterprise Manager, and enable the updown event for all your databases.
I say this because from the dba perspective you would want to receive that ORA-1034 error.

Hth,

Sybrand Bakker, Oracle DBA

<faheemrao_at_my-deja.com> wrote in message news:91qthr$dku$1_at_nnrp1.deja.com...
>
>
> Thanks a lot
> Sybrand
>
> But my problem is that before my application actually connect to the
> database , I want to check that the Oracle service is either runnig or
> not on the server.
> So that is why I need either server name or IP address.
>
> Actually server name can solve my problem IP address is not neccessary.
>
> Now you may understand my problem.
>
> To me the only solution is that I have to write a module that read the
> tnsnames file and get the server_name for that specific Oracle TCP/IP
> service.
>
> IS there any othet solution(easy) ???? :))
>
>
> thanks
>
>
> Faheem Rao
>
>
> In article <91qr15$4pm1t$6_at_ID-62141.news.dfncis.de>,
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> > As you, IIRC, *never* included platform and version info, and the
 answer is
> > going to be platform and version specific, how do you expect to get a
> > response?
> > Also, stay away from the IP-address: they change.
> > Do not use the IP address in tnsnames.ora. It does work, but it is not
> > endorsed by Oracle.
> >
> > Regards,
> >
> > Sybrand Bakker, Oracle DBA
> >
> > <faheemrao_at_my-deja.com> wrote in message news:91qpg7
 $9uv$1_at_nnrp1.deja.com...
> > > I have put this question on deja soo many times but, no one is
 there
> > > to get a solution for me.
> > >
> > > I want to know that what is the host name an oracle ODBC data
 source
> > > (using Oracle ODBC driver) through registry. But Oracle ODBC data
> > > source does not provide such information in the registry. I know
 that
> > > its information is stored in the tnsnames file.Only the service is
> > > stroed in the registry.
> > >
> > > But actual problem is that I want to get the host IP adress form
 the
> > > C++ application.
> > > Any body tell me that from where I can get that Ip address of the
 ODBC
> > > data Source.
> > > I know that I can get this Information through a C++ module that
 read
> > > the whole tnsnames text file.
> > >
> > > Is there any other easy solution.??
> > >
> > >
> > > thanks in advance
> > >
> > >
> > > Faheem Rao
> > >
> > >
> > > Sent via Deja.com
> > > http://www.deja.com/
> >
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Wed Dec 20 2000 - 16:05:35 CST

Original text of this message

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