Database Identification by Service Name

An Oracle database is represented to clients as a service, that is, the database performs work on behalf of clients. A database can have one or more services associated with it.

Up to this release, an Oracle database service was uniquely 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. The service name is specified by the SERVICE_NAMES parameter in the initialization parameter file. SERVICE_NAMES specifies the name of the highest-level view of Oracle database service, that may span instances and/or nodes. SERVICE_NAMES is defaulted to the global database name, a name comprised of the database name and domain name.

Instance Name

Database instances are identified by an instance name with the INSTANCE_NAME parameter in the initialization parameter file. INSTANCE_NAME corresponds to the SID of the instance.

Connect Descriptors

Configure connect descriptors with the SERVICE_NAME (without an S) parameter to connect to an Oracle8i database. For example, the following connect descriptor contains the address of a listener located on sales-sun1 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))

Optionally, connect descriptors can 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 following connect descriptor contains the address of a listener located on sales-sun1 listening for connection requests for an instance called sales associated with the sales.us.acme.com database:

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