Analysis of Oracle database name, instance name, database domain name, database service name and global database name

Source: Internet
Author: User

I also look at your aunt's blog and then a little to learn, do not ask the plenary, leave an impression

Database name

The database name is the identity of a database, represented by the parameter db_name.

If multiple databases are installed on a single machine, each database has a database name.

View the current database name

Select name from V$database;

Show parameter db;

View parameter file

The database name should be considered when you start to build the library, and don't wait for the database name to come back, which can be cumbersome. Also prone to problems.

DB Instance Name

The database instance name is the name used by the operating system to interact with the database.

The database instance name is also written to the parameter file, denoted by instance_name, if it is also written to the registry under Windows.

In general, the instance name and database name are a one-to-many relationship, but if the Oracle cluster is true, the database name and instance name are a one-to-numerous relationship.

DB Instance name and Oracle_sid

Instance_name is an Oracle database parameter, and ORACLE_SID is an environment variable for the operating system.

In the database connection process, ORACLE_SID must be consistent with the value of instance_name, otherwise error:

Under UNIX: Oracle not available

Win under: TNS: Protocol Adapter error

The database instance name is also the Oracle server identity for the network connection.

When configuring the Oracle host connection string, you need to specify the instance name, of course, the network component of 8i later requires the service name Service_Name.

Database domain name

In distributed database systems, between different versions of the database server, whether the operating system is UNIX or Windows, each server can be remotely replicated through the database link, the database domain name is mainly used for replication in the Oracle distributed environment.

such as the distributed database of the National Transportation and transport system, which

Fujian node: Fj.jtyz

Xiamen, Fujian node: Xm.fj.jtyz

This is the database domain name.

The database domain name exists in the parameter file and its parameters are Db_domain

Select value from V$parameter where name= ' db_domain ';

Show parameter domain

viewing in the Parameters file

Global database name

Global database name = database name + database domain name

As previously mentioned, the global database name of Fujian node is: Oradb.fj.jtyz

Database service Name

Starting with Oracle9i, a new parameter, the database service name, is introduced and the parameter is service_name.

If the database has a domain name, the database service name is the global database name; otherwise, the data service name is the same as the database name.

Select value from v$parameter where name = ' service_name ';

Show parameter service_name;

Querying in the parameters file

Database service name and network connection

Oracle network components starting from Oracle8i, database and client connection host strings use the database service name. Previously used is ORACLE_SID, which is the database instance name.

Analysis of Oracle database name, instance name, database domain name, database service name and global database name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.