Database Identification by Service Name Rather than SID

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.

Service Name

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).

Instance Name

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

Connect descriptors used by clients should be configured with the SERVICE_NAME (without an S) parameter to connect to an Oracle8i database. The Net8 Configuration Assistant allows you to configure connect descriptors with the SERVICE_NAME parameter in a tnsnames.ora file. For example, the following connect descriptor contains the address of a listener located on sales1-sun listening for connection requests for a database service called sales.us.acme.com:

 
sales=
(description=
(address=(protocol=tcp)(host=sales-sun1)(port=1521))
(connect_data=
(service_name=sales.us.acme.com)))

See Also:

Create a Net Service Name in a tnsnames.ora File

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 necessary if you have an Oracle Parallel Server with multiple instances.

For example, the connect descriptor below contains the address of a listener located on sales-sun1 listening for connection requests for an instance called sales1 associated with the sales.us.acme.com database:

   
sales=
(description=
(address=(protocol=tcp)(host=sales-sun1)(port=1521))
(connect_data=
(instance_name=sales1)
(service_name=sales.us.acme.com)))

This is an advanced feature not supported by the Ne8 Configuration Assistant.

For More Information: See Chapter 8, Enabling Advanced Net8 Features, in the Net8 Administrator's Guide for further information about specifying an instance name in the CONNECT_DATA portion of a connect descriptor.