Re: SIDs on network

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 15 Jan 2003 12:04:06 -0000
Message-ID: <3e254e38$0$246$ed9e5944_at_reading.news.pipex.net>


"dom" <dominic.morris_at_eidosnet.co.uk> wrote in message news:c5c9bfea.0301150126.226db1f4_at_posting.google.com...
> Hi Daniel,
>
> Please excuse my lack of knowledge here; I am an complete Oracle
> newbie.
>
> I'm writing a Windows client application; I'd like to scan the LAN for
> Oracle servers. E.g. my test setup consists of Oracle Ent. running on
> my development laptop, aswell as a dedicated machine also running
> Oracle Enterprise. When I run my application on this LAN, I'd like the
> two (assuming once instance per machine) servers' SIDs to show up in a
> listbox...

What you want to do is going to be difficult to do robustly. In general (probably 90%+ of cases) the connection information for oracle servers is held in a text file called tnsnames.ora. So you could parse this file and spit out the connection aliases it finds. I believe TOAD does this. However in some circumstances connection details may be held in a central server, or in fact you may be able to connect just by using the dns name of the server.

> OEM == Oracle Enterprise Manager?

Yes.OEM does this by querying an agent running on the database server, which in turn has queried the listener for database service names. I maybe wrong but I don't believe that Oracle publish how to do this.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Wed Jan 15 2003 - 13:04:06 CET

Original text of this message