Oracle Learning Notes-db_name, Db_domain, Global_name, service_name, instance_name and Oracle_sid (reprinted)

Source: Internet
Author: User

Reprinted from:

The difference between db_name,sid,db_domain,service_name and so on in Oracle

Db_name: A unique identifier for a database (Oracle db). This representation is sufficient for a single database, but with the popularization of a distributed database consisting of multiple databases, this method of command-database poses a burden on the management of the database, because the names of each database may be the same, resulting in administrative confusion. In order to solve this situation, the Db_domain parameter is introduced, so that the identity of the database is determined by the combination of the db_name and db_domain two parameters, which avoids the management confusion because of the database duplicate name. This is similar to the management of the machine name on the interconnection network. We will db_name and db_domain two parameters with '. ' Connected, represents a database, and the name of the database is called Global_name, that is, it extends the db_name. The db_name parameter can only consist of letters, numbers, ' _ ', ' # ', ' $ ', and a maximum of 8 characters.

Db_domain: Defines the domain in which a database resides, and the name of the domain is not related to the ' domain ' of the Internet, but is determined by the database administrator in order to better manage the distributed database. Of course, for ease of management, it can be equal to the Internet domain.

Global_name: A unique identifier for a database (Oracle DB), which Oracle recommends to command the database in this manner. The value is determined at the time the database was created, and the default value is Db_name. Db_domain. Any subsequent modification of the db_name and Db_domain parameters in the parameter file does not affect the value of global_name, and if you want to modify Global_name, you can only use alter DATABASE RENAME Global_name to <db_ The name.db_domain> command changes and then modifies the corresponding parameters.

SERVICE_NAME: This parameter is newly introduced by Oracle8i. Before 8i, we used SIDS to represent an instance of the identity database, but in Oracle's parallel environment, a database corresponds to multiple instances, which requires multiple network service names and is cumbersome to set up. In order to facilitate the setting in the parallel environment, the SERVICE_NAME parameter is introduced, which corresponds to a database, not an instance, and there are many other benefits to this parameter. The default value for this parameter is db_name. Db_domain is equal to Global_name. A database can correspond to multiple service_name for a more flexible configuration. This parameter is not directly related to the SID, which means that the service name must be the same as the SID.

Instance_name: The database instance name. Used in connection with the operating system for external connections. In the operating system to obtain interaction with the database, the database instance name must be used. For example, to connect to a database server, you must know its database instance name, only the database name is useless, and unlike the database name, the instance name can be modified after the data is installed or the database is created. The relationship between the database name and the instance name is typically one by one correspondence, there is a database name has an instance name, if you create two databases in a server, there are two database names, two DB instance names, with two identities to determine a database, the user and the instance are connected. However, in 8i, 9i parallel server structure, there is no one by one correspondence between the database and the instance, but a one-to-many relationship, (a database corresponding to multiple instances, the same time the user only one instance of the connection, when an instance fails, other instances of automatic service, to ensure that the database safe operation. )

ORACLE_SID: Operating system environment variable. In practice, the instance name (instance_name) parameter is sometimes used for the description of the database instance name, sometimes using the Oracle_sid parameter. These are both database instance names, what's the difference?

(ORACLE_SID) os<---------------->oracle Database <--------(instance_name (instance name))

The example above represents the relationship between the instance name instance_name, Oracle_sid and the database and operating system, although the two parameters listed here are DB instance names, but the instance_name parameter is an ORACLE database parameter that can be queried in the parameter file , while the ORACLE_SID parameter is the operating system environment variable.
The operating system environment variable ORACLE_SID is used to interact with the operating system. In other words, to get the instance name in the operating system, you must use ORACLE_SID. This parameter is the same as Oracle_base, Oracle_home, and so on. After the database is installed, ORACLE_SID is used to define the name of the database parameter file. Such as:
$ORACLE _base/admin/db_name/pfile/init$oracle_sid.ora.

Oracle Learning Notes-db_name, Db_domain, Global_name, service_name, instance_name and Oracle_sid (reprinted)

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.