In a distributed database system, each database should have a unique global database name. Global database names uniquely identify a database in the system. For example, if global naming is enforced by the remote database, you must use the remote database global database name as the name of the database link that you are creating.
In this article, we will examine the following topics:
- How to check if global naming is enforced?
- How to view different names?
- How to change the domain name in a global database name?
How to check if global naming is enforced?
To determine whether global naming on a database is enforced on a database, you can either examine the database initialization parameter file or query the V$PARAMETER view. For example, to see whether global naming is enforced on the remote database, you could start a session on the remote database and then create and execute the following globalnames.sql script (sample output included):
COL NAME FORMAT A12
COL VALUE FORMAT A6
SELECT NAME, VALUE FROM V$PARAMETER
WHERE NAME = 'global_names'
Note that global naming is not enabled by default when you install a new Oracle database. In other words, you won't find the parameter global_names in the new initialization parameter file.
Global Database Name
In our installation, we have used "orcl.us.oracle.com" as the global database name, which is composed of two components:
- "us.oracle.com" (must follow standard Internet conventions)
You can find this piece of information in your initialization parameter file:
How to query different names?
If a database instance is created, you should be able to find out all different names from the data dictionary:
- SQL> select name from v$database;
- SQL> SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'db_domain';
- SQL>SELECT * FROM GLOBAL_NAME;
How to change domain name?
The db_domain initialization parameter is only important at database creation time when it is used, together with the db_name parameter, to form the database global name. At this point, the database global name is stored in the data dictionary. You must change the global name using an ALTER DATABASE statement, not by altering the db_domain parameter in the initialization parameter file. It is good practice, however, to change the db_domain arameter to reflect the change in the domain name before the next database startup.
For more details on how to change the domain in a global database name, you can read .
- Installing Oracle Database 11g Release 2
- Managing Global Names in a Distributed System
- How to Change DB_NAME & ORACLE_SID
- Using Database Configuration Assistant to Create Additional Databases
- Using Net Configuration Assistant to Configure a Listener