Global Database Name? Database Name? Instance name?

Source: Internet
Author: User

For beginners, Database Name (db_name), database instance name (instance_name), operating system environment variable (oracle_sid), Database Service name (SERVICE_NAME), Database domain name (db_domain ), global Database Name (global_name ).

Oh, you may think about what these are. Why is it so troublesome. My database is clearly named. A name is allowed.

Don't be scared by them. Today, let's see what happened to him.

Database Name (db_name): Indicates the internal identifier used to distinguish a data, that is, the internal representation of the Oracle database. It stores the parameters of control files stored in the database in binary mode. This parameter cannot be modified after the database is installed or created (it can be modified. I will introduce it later). It is written into pfile.

######################################## ###
# Database Identification
######################################## ###
Db_domain = ""
Db_name = yuyu

Database instance name (instance_name ):The instance name is used to associate with the operating system. To obtain the interaction with the database in the operating system, you must use the database instance name. (Here we need to know what an instance is, simply put, memory and some background processes. That's why I contacted the operating system !)

Generally, database names correspond to instance names one by one. However, in the parallel service structure of Oracle, the relationship between databases and instances is one-to-many.

SQL> select instance_name from V $ instance;

Instance_name
--------------------------------
Yuyu

OS environment variable (oracle_sid ):Relationship between OS environment variables (oracle_sid) and instance_name: instance_name is the database parameter of Oracle, while oracle_sid is the environment variable of the operating system. Users interact with the operating system, that is to say, to get the Instance name, you must use Sid. At the end of database installation, oracle_sid is a fixed string and its value must be the same as the database instance name.

Database domain name (db_domain ):In Oracle10g, db_domain represents the Domain Name

When will the database domain name be determined? The database domain name is the same as the database name and database instance name. It is determined when the database is installed. If you enter yuyu when determining the database name, it indicates the database. If you enter yuyu.yuhongping.com.cn. Yuhongping.com.cn is the domain name.

View me:

SQL> select value from V $ Parameter
2 Where name = 'db _ Domain ';

Value
--------------------------------------------

SQL> show parameter domain;

Name type value
----------------------------------------------------------------------------------------
Db_domain string

No value indicates that I have no domain name.

Global Database Name:The sum of the Database Name and domain name. Haha, if my domain name does not exist, the global database name is the same as the database name.

Database Service name:It is a parameter introduced from 9i, 10g. It is represented by service_names. The Database Service name is the same as the global database name.

SQL> show parameter SERVICE_NAME;

Name type value
-------------------------------------------------------------------------
Service_names string yuyu

SQL> select value from V $ Parameter
2 Where name = 'service _ names ';

Value
------------------------------------------

Yuyu

Well, I have finished the introduction. Do you understand it.

Yuyu understands.

Http://hi.baidu.com/%B3%F3%C5%AEyuyu/blog/item/77d1e1953cd94712d31b7073.html

 

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.