Oracle Database - Global Database Name (GLOBAL_NAME)

> Database > Oracle Database

1 - About

The Oracle Database (11g) software identifies a database by its global database name. A global database name consists of the database name and database domain. Usually, the database domain is the same as the network domain, but it need not be. The global database name uniquely distinguishes a database from any other database in the same network. You specify the global database name when you create a database during the installation, or using the Database Configuration Assistant. For example:

orcl.example.com

In this example:

  • orcl is the name of the database.

The database name portion is a string of no more than 30 characters that can contain alphanumeric, underscore (_), dollar ($), and pound (#) characters. The DB_NAME initialization parameter specifies the database name.

  • example.com is the database domain in which the database is located.

In this example, the database domain is the same as the network domain. The DB_DOMAIN initialization parameter specifies the database domain name. The domain portion is a string of no more than 128 characters that can contain alphanumeric, underscore (_), and pound (#) characters.

Together, the database name and the database domain make the global database name unique.

The DB_NAME parameter and the DB_DOMAIN name parameter combine to create the global database name value assigned to the SERVICE_NAMES parameter in the initialization parameter file.

GLOBAL_NAME is a table and GLOBAL_NAMES is a parameter

Advertising

3 - How to

3.1 - Create it ?

For example, to create a database with a global database name of test.us.acme.com, edit the parameters of the new parameter file as follows:

DB_NAME = test
DB_DOMAIN = us.acme.com

3.2 - Rename it ?

You can rename the GLOBAL_NAME of your database using the ALTER DATABASE RENAME GLOBAL_NAME statement.

ALTER DATABASE RENAME GLOBAL_NAME TO sales.us.oracle.com;

However, you must also shut down and restart the database after first changing the DB_NAME and DB_DOMAIN initialization parameters and re-creating the control file.

3.3 - Query it ?

SELECT * FROM global_name;
GLOBAL_NAME
--------------------
ORCL.LOCALDOMAIN

3.4 - Enforce the global naming on a database?

To enforce the database global naming, you must set the GLOBAL_NAMES parameter to TRUE.

If the remote database enforces global naming, then you must use the remote database global database name as the name of the Oracle Database - Database Link.

Advertising

4 - Documentation / Reference

db/oracle/global_name.txt · Last modified: 2017/09/06 19:28 by gerardnico