Database name (db_name) instance name (instance_name) service name (SERVICE_NAME)

Source: Internet
Author: User

    • Database name (db_name)

The identity of the database, just like a person's social security number, is required to install the database, create a new database, create a database control file, modify the data structure, and back up and restore the database.

Select name from v$database;--querying the current data name

    • DB instance name (instance_name)

The database instance name is the identity used to contact the operating system, meaning the database instance name is used for interaction between the database and the operating system.

In general, database names and instance names are a one-to-many relationship, but if you are in an Oracle Parallel server architecture (that is, Oracle real-time application clusters), the database name and instance name are a one-to-numerous relationship.

Select instance_name from V$instance; -- Query the current DB instance name

DB Instance name and Oracle_sid

      1. Although both tables are Oracle instances, there is a difference between the two.
      2. Instance_name is an Oracle database parameter, and ORACLE_SID is an environment variable for the operating system.
      3. Oracld_sid is used to interact with the operating system, access the instance name from the operating system's perspective, and must pass ORACLE_SID.
      4. Oracle_sid must be consistent with the value of instance_name.

DB instance name and network connection

      1. The database instance name is also used for the Oracle server identity of the network connection in addition to interacting with the operating system.
      2. When you configure the Oracle host connection string, you need to specify the instance name, of course, the 8i later version of the network components require the use of the service name Service_Name.
    • Database domain name (db_domain)


Use in distributed environments

Select value from v$parameter where name = ' Db_domain '; -- querying database domain names


Global database name global database name = database name. database Domain Name

    • Database service Name (SERVICE_NAME)
      1. Starting with the Oracle9i version, a new parameter, the database service name, was introduced. The name of the parameter is service_name.
      2. If the database has a domain name, the database service name is the global database name; otherwise, the database service name is the same as the database name.
      3. Connect using the service name from version 8i.

Select value from v$parameter where name = ' service_name ';--query database service name

Database name (db_name) instance name (instance_name) service name (SERVICE_NAME)

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.