Oracle database name, instance name, Oracle_sid

Source: Internet
Author: User
Tags oracle database installation

This article refers to the difference from ORACLE database name, instance name, Oracle_sid, purely reading notes, deepen memory

Only the database name (db_name) and the database instance name (instance_name) are in the ORACLE7, 8 database. A new parameter, the database domain name (db_domain), the service name (SERVICE_NAME), and the operating system environment variable (ORACLE_SID), appears in Oracle8i, 9i. These are identified in the same database and are used to differentiate the parameters of different databases.

1. Database name

The database name is used to distinguish the identity of the data, is stored in binary form in the database control file parameters, after the database installation or creation, after the creation of the database, the parameter will be written to the database control parameter file Pfile, the basic format is as follows:

... db_name= "ORCL" # (not allowed to modify) db_domain=dbcenter.toys.com INSTANCE_NAME=ORCL service_names= Orcl.dbcenter.toys.com control_file= (................

Note: Each database running Oracle 8i and above has a database name. However, if the server program created two databases, then there will be two database names, which are stored with different database control parameter file Pfile, respectively, control the corresponding database.

2. Database instance Name

The database instance name is used to connect to the operating system and is used for external connections. In the operating system, the connection to the database must be made through the instance name. For example: To connect with a database server, you must pass the instance name, only know the database name is useless, and the database name is different, the database instance name can be modified after the database is installed or created. After the database is installed, the corresponding instance name is written to the database control parameter file Pfile (in the form of a code block), you can modify this file to modify the Oracle database instance name, of course, the database name can not be modified!

Db_name= "ORCL" # (database name: not allowed to modify) db_domain=dbcenter.toys.com INSTANCE_NAME=ORCL # (DB instance Name: Can be modified, can be the same or different from db_name) service _names=orcl.dbcenter.toys.com control_file= (................

3. Relationship between database name and instance name

A, the relationship between the database name and instance name is usually one by one corresponding, there is a database name, there is an instance name. Of course, if you create two databases on the server, then there will be two database names and two instance names;

B. A database name and an instance name can be used to determine an available database

Focus: Oracle Database Installation during Oracle 8i and above will have

Left the red box of the database installation type, is the Oracl parallel server structure, the structure of the database and the instance is not one by one corresponding relationship, but a one-to-many relationship (a database corresponding to multiple instances, that is, one user only with one user at a time, when an instance fails, other instances of automatic service, To ensure the safe operation of the database, this installation mode is suitable for high concurrent access situations.

4. Operating system environment variables (ORACLE_SID)

In many cases, the description of the database instance name, sometimes using the (instance_name) parameter, sometimes using the Oracle_sid parameter, both of which are DB instance name parameters, but the following are their differences:

A, Oracle_sid is the operating system environment variables

B, instance_name is the Oracle database configuration file parameter

C, the operating system wants to obtain the database instance name must pass through the system environment variable ORACLE_SID, but if the Oracle database wants to obtain the database instance name, can obtain through the parameter file

Oracle database name, instance name, Oracle_sid

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.