Db_name: Unique identifier of a database (Oracle database. This expression is sufficient for a single database, but with the popularization of distributed databases composed of multiple databases, this method of Command database creates a certain burden on database management, because the names of various databases may be the same, resulting in management confusion. To solve this problem, the Db_domain parameter is introduced. In this way, the database ID is determined by the two parameters Db_name and Db_domain, avoiding management confusion caused by database name duplication. This is similar to managing machine names on the Internet. We connect the parameters Db_name and Db_domain with '.' to indicate a database, and the database name is Global_name, that is, it extends Db_name. The Db_name parameter can only contain letters, numbers, '_', '#', and '$', and can contain a maximum of 8 characters.
Db_domain: defines the domain where a database is located. The domain name has nothing to do with the 'region' on the Internet. It is determined by the database administrator in order to better manage the distributed database. Of course, to facilitate management, it can be equal to the domain of the Internet.
Global_name: the unique identifier of a database (Oracle database). We recommend that you use this method to command the database. This value is determined when you create a database. The default value is Db_name. Db_domain. Any modifications TO the parameters of Db_name and Db_domain In the parameter file will not affect the value of Global_name. TO modify Global_name, you can only use the alter database rename GLOBAL_NAME TO <db_name.db_domain> command TO modify it, modify the parameters.
Service_name: this parameter is newly introduced by oracle8i. Before 8i, we used SID to identify an instance of the database. However, in the parallel environment of Oracle, a database corresponds to multiple instances, so that multiple network service names are required, configuration is cumbersome. To facilitate the setting in the parallel environment, the Service_name parameter is introduced, which corresponds to a database rather than an instance, and has many other advantages. The default value of this parameter is Db_name. Db_domain, which is equal to Global_name. [A database can correspond to multiple service_names] for more flexible configuration. [This parameter has no direct relationship with SID], that is, the Service name must be the same as the SID.
Instance_name: name of the database instance. Used for external connection to the operating system. To obtain interaction with databases in the operating system, you must use the database instance name. For example, to connect to a database server, you must know its database instance name. It is useless to know only the database name. Unlike the database name, after the data is installed or the database is created, the instance name can be modified. [The relationship between the database name and Instance name is generally a one-to-one correspondence relationship, with one database name and one instance name]. If you create two databases on a server, there are two database names, two database instance names are used to identify a database. The user and instance are connected. [However, In the 8i and 9i Parallel Server structures, there is no one-to-one correspondence between the database and the instance, but one-to-many relationship] (a database corresponds to multiple instances, within the same time, the user is associated with only one instance. When an instance fails, other instances are automatically served to ensure the safe operation of the database .)
Oracle_SID: operating system environment variable. In practice, the description of the database instance name sometimes uses the Instance name (instance_name) parameter, and sometimes uses the ORACLE_SID parameter. The two are database instance names. What are their differences? (Frequent obfuscation)
(ORACLE_SID) OS <---------------->;
ORACLE database <-------- (Instance_name (Instance name ))
The preceding example shows the relationship between the Instance name instance_name and ORACLE_SID and the database and the operating system. Although the two parameters listed here are database instance names, the instance_name parameter is a parameter of the ORACLE database, this parameter can be queried in the parameter file, while ORACLE_SID is the operating system environment variable.
The operating system environment variable ORACLE_SID is used to interact with the operating system. That is to say, to get the Instance name in the operating system, you must use ORACLE_SID. This parameter is used in the same way as ORACLE_BASE and ORACLE_HOME. After the database is installed, ORACLE_SID is used to define the name of the database parameter file. For example:
$ ORACLE_BASE/admin/DB_NAME/pfile/init $ ORACLE_SID.ora.
This article is from the "Seven little IT life"