The definitions of SERVICE_NAME and SERVICE_NAMES and GLOBAL_DBNAME, globaldbname
SERVICE_NAME parameter value in the tnsnames. ora file -- this parameter has different values for Dynamic Registration and static registration.
For Dynamic Registration:
The following pfile/spfile parameters are important when setting the value
For SERVICE_NAME in the tnsnames. ora file:
DB_NAME
DB_DOMAIN
SERVICE_NAMES
In a word:
Use the values of the parameters existing in the pfile or spfile,
Namely DB_NAME and DB_DOMAIN to determine the value of the SERVICE_NAME that shoshould be used in the TNSNAMES. ORA.
That is: SERVICE_NAME = DB_NAME.DB_DOMAIN
######################################## ######################################## #######################################
For static registration:
If using statically defined SIDs in the listener. ora file under SID_DESC,
GLOBAL_DBNAME parameter (within SID_DESC) must match the value set in
Tnsnames. ora file for SERVICE_NAME.
That is: SERVICE_NAME = GLOBAL_DBNAME parameter (in the listener. ora file)
Appendix 1: Definitions of GLOBAL_DBNAME In the listener. ora file:
-- From: Global Database Name Explained (Doc ID 115499.1)
In the LISTENER. ORA file, under the sections SID description, a parameter
GLOBAL_DBNAME can be found. This parameter identifies the database by its
Global database name and consists of the name and domain name of the database,
As given in SERVICE_NAMES parameter in the database initialization parameter
File (init <SID>. ora ).
That is: GLOBAL_DBNAME = consists of the name and domain name of the database
The value of this parameter is used by the Oracle Intelligent Agent
Determine the service name of the database. Detailed information about this
LISTENER. ORA parameter can be found in Note: 97066.1 "How the Intelligent
Agent determines a database service name ".
Appendix 2:
Description of database initialization parameter service_names:
By default, service_names is DB_NAME.DB_DOMAIN