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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: db_name, instance_name, service_names and the sqlnet alias

RE: db_name, instance_name, service_names and the sqlnet alias

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Fri, 23 Mar 2001 11:18:11 -0800
Message-ID: <F001.002D6622.20010323102027@fatcity.com>

see answer below.

> -----Original Message-----
> From: ALEMU Abiy [mailto:abiy.alemu_at_criltechnology.com]
>
> What is the relation between db_name,  instance_name,
> service_names and the
> sqlnet alias for an instance.  'Cause in my init.ora file I
> fdefined the
> following things
>       db_name = "db1"
>       instance_name=inst1
>       service_names=service1
>
> And I defined an entry in my tnsnames.ora file, for my
> instance as following
> :
>
> cs_inst1 =

>   (DESCRIPTION =
>     (ADDRESS_LIST =
>         (ADDRESS =
>           (COMMUNITY = TCPCOM)
>           (PROTOCOL = TCP)
>           (Host = alpha)
>           (Port = 1527)
>         )
>     )
>     (CONNECT_DATA =
>        (SID = db1)
>        (GLOBAL_NAME = cs_inst1)
>     )
>   )

>
> But I cannot connect to my instance by the following command .
>       sqlplus system/manager_at_cs_inst1

The db_name is the name of the database (the files on disk). The SID is the name of the instance (the background processes and shared memory).

The database name and the SID are not necessarily the same, and for example if you have Oracle Parallel Server (OPS) running, you can have several instances for one database. So you can see why there are good reasons for them to be different. Also database names cannot be as long as SIDs.

The alias in your TNSnames.ora file can be different from the db_name and also different from the SID. Or all three can be the same. However, the SID= parameter in TNSnames.ora expects an INSTANCE name, the SID, and NOT the database name. This can also be explained with the OPS example: when you have several instances accessing the same database, the instances are typically on different hosts, and you are connecting to only one of those instances.

In your case, you have the database name as a value for SID=, which is incorrect.



Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com Received on Fri Mar 23 2001 - 13:18:11 CST

Original text of this message

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