Re: Get list of databases

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 21 Nov 2002 00:49:08 GMT
Message-ID: <84WC9.118$BC.16746549_at_newssvr14.news.prodigy.com>


[Quoted] However, you can have a similar problem with ONAMES. You can have multiple net service names there as well. Besides, there are some white [Quoted] papers at Oracle that say ONAMES is going away, to be replaced by LDAP-style naming. Of course, since ONAMES is still in 9i, maybe those Oracle employees didn't know what they were talking about.

Did you suggest he get *an* Oracle consultant ... or one named Bertram? ;)

[Quoted] Bert Bear wrote:

> Van,
> 
[Quoted] > This is one of the MAIN REASONS I strongly suggested to him they ONAMES
> (Oracle Centralized Naming) on their network.  I also suggest the company
[Quoted] > get an Oracle consultant.
> 
> Bertram Moshier
> Oracle Certified Professional 8i and 9i DBA
> 
> http://www.bmoshier.net/bertram
> 
> 
> "Van Messner" <vmessner_at_bestweb.net> wrote in message
> news:uto3okcnb4c9c6_at_corp.supernews.com...
> 

>>It might not be that easy. Across the whole network there may be multiple
>>tnsnames.oras. Some might use service_name some might use SID some may
> 
> have
> 

>>qualified net service names (SNEAKERS.mycompany.com ) and some may be
>>unqualified. Even this works and allows you to connect using JACK as the
>>connect string in SQL*Plus. So parsing could get complicated.
>>
>>SNEAKERS, JACK =
>> (DESCRIPTION =
>> (ADDRESS_LIST =
>> (ADDRESS = (PROTOCOL = TCP)(HOST = ERCF)(PORT = 1521))
>> )
>> (CONNECT_DATA =
>> (SERVER = DEDICATED)
>> (SERVICE_NAME = sneakers)
>> )
>> )
>>
>>"Bert Bear" <bertbear_at_NOSPAMbertbear.net> wrote in message
>>news:XiTC9.1433$Aq2.504205332_at_newssvr30.news.prodigy.com...
>>
>>>Robert,
>>>
>>>First, I think you are using the term "Oracle service" correctly.
>>
> Oracle
> 

>>in
>>
>>>Getting to Know Oracle8i Release 2 (8.1.6) Part Number A76962-01 uses
>>
> the
> 

>>>term Oracle database service to refer to an Oracle database instance/SID
>>>(before 8i) and Oracle database service_name (for parallel server/RAC)
>>
> in
> 

>>8i
>>
>>>and beyond.
>>>
>>>The TNSNAMES.ORA is (normally) in the $ORACLE_HOME/network/admin
>>>subdirectory (for Window since you mentioned .NET). The structure of
>>
> the
> 

>>>TNSNAMES.ORA file is in the documentation.
>>>
>>>Basically, though, what you want to put into the combo box is the
>>
> connect
> 

>>>descriptors. You find those in the file by parsing for <connection
>>
>>string>
>>
>>>= (DESCRIPTION An example (9.2.0.1.0) is:
>>>
>>>SNEAKERS =
>>> (DESCRIPTION =
>>> (ADDRESS_LIST =
>>> (ADDRESS = (PROTOCOL = TCP)(HOST = ERCF)(PORT = 1521))
>>> )
>>> (CONNECT_DATA =
>>> (SERVER = DEDICATED)
>>> (SERVICE_NAME = sneakers)
>>> )
>>> )
>>>
>>>In this case, you would look for the name SNEAKERS (SNEAKERS =
>>
>>(DESCRIPTION
>>
>>>= ... )) by parsing for = (DESCRIPTION. This only helps you if all the
>>>service names are in the TNSNAMES.ORA file. Additionally, this will
>>
> also
> 

>>>work ONLY if everyone using the combo box has the same TNSNAMES.ORA file
>>
>>as
>>
>>>you. If they don't then your connection string and theirs won't match.
>>>
>>>As I previously said (see prior message): You should look at using
>>
> ONAMES
> 

>>>and creating the combo box from the ONAMES configuration file (NOT
>>>TNSNAMES.ORA). Should you decide NOT to go with ONAMES, then you need
>>
> to
> 

>>>provide all the TNSNAMES.ORA information on the webpage for each Oracle
>>>service.
>>>
>>>I would be happy to consult on this topic with your company (and my
>>>(non-inclusive) rates are reasonable).
>>>
>>>Bertram Moshier
>>>Oracle Certified Professional 8i and 9i DBA
>>>
>>>http://www.bmoshier.net/bertram
>>>
>>>Service Naming
>>>An Oracle database can span multiple instances over multiple computers,
>>>making the database service a distributed service.
>>>
>>>Prior to Oracle8i, an Oracle database service was identified by an
>>
> Oracle
> 

>>>System Identifier (SID). The SID was also used internally by the
>>
> database
> 

>>as
>>
>>>pointer to the System Global Area (SGA). Clients connected to a database
>>>instance by specifying the SID in the connect descriptor. This naming
>>
>>scheme
>>
>>>did not distinguish services from instances.
>>>
>>>In Oracle8i, a new naming schema has been implemented. Because an Oracle
>>>database can span over multiple computers, both the service as a whole
>>
> and
> 

>>>each of its instances are specified.
>>>
>>>A database is now identified by its service name with the SERVICE_NAMES
>>>parameter in the initialization file. SERVICE_NAMES specifies the name
>>
> of
> 

>>>the highest-level view of Oracle database service, which may span
>>
>>instances
>>
>>>and/or nodes. SERVICE_NAMES is defaulted to the global database name, a
>>
>>name
>>
>>>comprised of the database name (DB_NAME) and domain name (DB_DOMAIN).
>>>
>>>Database instances are identified by an instance name with the
>>
>>INSTANCE_NAME
>>
>>>parameter in the initialization file. INSTANCE_NAME corresponds to the
>>
> SID
> 

>>>of the instance.
>>>
>>>Connect descriptors used by clients should be configured with the
>>>SERVICE_NAME (singular, not plural) parameter to connect to an Oracle8i
>>>database.
>>>
>>>Optionally, the connect descriptor can also be configured with the
>>>INSTANCE_NAME parameter to connect to a particular instance of the
>>
>>database.
>>
>>>This may be useful if you have an Oracle Parallel Server with multiple
>>>instances.
>>>
>>>
>>>
>>>"Robert Vabo" <rvabo_at_msn.com> wrote in message
>>>news:3ddbe156_at_news.wineasy.se...
>>>
>>>>I'm sorry about the cross post. Its just that I have been asking
>>>
>>>questions,
>>>
>>>>searching etc. for about a week without getting any answers.
>>>>
>>>>Why am I interested in listing up Oracle Services (or whatever they
>>>
> are
> 

>>>>called)
>>>>HOW TO GET THE ENTRIES IN THE TNSNAMES.ORA FILE!! so I can fill a
>>>
> Combo
> 

>>>with
>>>
>>>>it ?
>>>>
>>>>Oracle does it themselves when you use Net Assistant!
>>>>
>>>>--
>>>>Regards
>>>>Robert Vabo
>>>>Gecko AS
>>>>www.gecko.no
>>>>
>>>>"Robert Vabo" <rvabo_at_msn.com> skrev i melding
>>>>news:3ddb83a0_at_news.wineasy.se...
>>>>
>>>>>How can I use .NET to retrieve a list of all Oracle services on my
>>>>
>>>network
>>>
>>>>?
>>>>
>>>>>--
>>>>>Regards
>>>>>Robert Vabo
>>>>>Gecko AS
>>>>>www.gecko.no
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
> Received on Thu Nov 21 2002 - 01:49:08 CET

Original text of this message