- 论坛徽章:
- 0
|
关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID
--------from oracle metalink--------------
DB_NAME is the database identifier of up to eight characters. If specified, it must correspond to the name specified in the CREATE DATABASE statement. Although the use of DB_NAME is optional, it should generally be set before invoking CREATE DATABASE and then referenced in that statement. If not specified, a database name must appear on either the STARTUP OPEN db_name or ALTER DATABASE db_name MOUNT command line.
INSTANCE_NAME is a string value representing the name of the instance and is used to uniquely identify a specific instance when multiple instances share common services names.
Prior to Oracle 8i, clients connected to a database by specifying the Oracle SID (system identifier) in the connect descriptor. INSTANCE_NAME should not be confused with the SID, which actually uniquely identifies the instances shared memory on a host.
From 8i, the concept of a 'service name' has been introduced. Specifically, clients can specify 'service_name' and 'instance_name' in the connect descriptor. The SERVICE_NAMES is used to identify a database service. This parameters defaults to DB_NAME.DB_DOMAIN (the global database name). A database can be identified by more than one service name. Now INSTANCE_NAME identifies an instance of a database. This parameter is analagous to the SID of an instance, that is "SID_NAME" is now "SERVICE_NAME". Again, an instance can have only one "INSTANCE_NAME," but more than one "SERVICE_NAMES"
E.g.:
instance_name = v817
service_names = ( marketing, support, education )
One more thing to note here is, the parameter is "SERVICE_NAME" in tnsnames.ora and "SERVICE_NAMES" defined in "init<SID>;.ora".
The following articles which you could obtain using the search, will help you:
30715.1 Init.ora Parameter "DB_NAME" Reference Note
68522.1 Init.ora Parameter "INSTANCE_NAME" Reference Note
77640.1 SERVICE_NAME parameter in Oracle8i
76531.1 Service Name Usage in Net8i
69546.1 Oracle8i - Instance Registration to Listeners |
|