Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Conceptual understanding of Server_name and SID in ORACLE

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Description of blog post [preface]:

This article will introduce the relevant concepts of Server_name and instance name SID in ORACLE in a personal tone. At the current time point [May 22,2017], the technical level mastered is limited, and there may be a lack of in-depth or comprehensive understanding of a lot of knowledge. I hope you will point out the problems and communicate with each other. If you find that there is a deviation between the content of this article and the actual situation in the follow-up work and study, it will improve the content of this blog.

Citation links to references in this article:

1. Http://blog.csdn.net/luman1991/article/details/56286371

2. Http://blog.csdn.net/yaksok/article/details/52130228

Text:

The SERVER_NAME parameter was introduced by oracle8i. Before 8i, SID was used to identify an instance of the database, but in the parallel environment of Oracle, a database corresponds to multiple instances, so multiple network service names are required, which is tedious to set up. To facilitate setup in parallel environments, the Service_name parameter, which corresponds to a database rather than an instance, is introduced, and it has many other benefits. The default value of this parameter is Db_name. Db_domain is equal to Global_name. A database can correspond to multiple Service_name for more flexible configuration. This parameter is not directly related to SID, that is, it is not necessary that Service name must be the same as SID, and sid is the name of the database instance, which varies from instance to instance.

Case study:

First, the introduction of relationships:

Server = company

Database = operation and maintenance support department (database is divided into stand-alone and cluster environments, that is, the relationship between the number of people in the department)

Database cluster environment = operation and maintenance support department (assuming that there are two employees of Xiaoli and Xiaomei, corresponding to SID1,SID2)

Database connection request = company employees or other departments request technical support from the operation and maintenance department

Database server = a server loaded with a database, that is, a company with an active operation and maintenance department, of course, in addition to loading the database, I can also install other software to provide other services

Second, the working process:

1. Lao Wang, an employee of the R & D department, found that he could not connect to the database, so he sent a request on the company's internal communication platform, asking the operation and maintenance department to check whether the database service was abnormal.

2) Xiao Li of the Department of Operation and maintenance accepted the problem, that is, Xiao Li provided this service to Lao Wang, and finally solved the problem smoothly.

3) after a week, Lao Wang found that there was a problem with the database connection and sent a request on the company's internal communication platform, asking the operation and maintenance department to check whether the database service was abnormal.

4) Xiaomei of the Department of Operations and maintenance accepted this problem, that is, Xiaomei provided this service to Lao Wang, and finally solved the problem smoothly.

3. Case study

1. The real service provider here is SID (the first time is Xiao Li SID1, the second time is Xiaomei SID2, and the third time is one of the two)

2. In the operation and maintenance support department, there is a virtual user (Server_name) corresponding to the company's internal communication platform, and the user submits the feedback to the user, and then the virtual user dispatches the rear real node to provide services. Partners who have used the JIRA platform should be deeply impressed.

3, users do not have a relationship, who is the real person who provides services to me, every time only need to submit the problem to the virtual user (server_name), there will be support staff to solve my problem.

Note: here, if users know who is in the operation and maintenance department, they can also be configured to assign questions directly to such as Xiao Li, that is, when configuring database connection information, they can be configured to connect to SID directly, or to connect to server_name, and then server_name can regulate and control SID to process requests.

Summary:

SID:

A database can have multiple instances (such as RAC cluster environment), and SID is used to identify the name of each instance within the database, just as everyone in a department has his or her own name (Xiao Li, Xiao Mei, etc.).

SERVICE_NAME:

The name claimed by the database is like the name of a department whose name is registered with the listener of the database. As soon as the janitor saw that you were looking for SERVICE_NAME, he told you that our company did have this department, so you found it and the connection was established.

For a cluster, the SID of each node is different, but the SERVICE_NAME can contain all nodes.

In a word, it is:

SID is an instance-level name for internal and inter-database addressing.

SERVICE_ is external, a name at the database level, used to tell outsiders that my database is called "SERVICE_NAME".

You can specify what the name is through the service_name parameter. You can have multiple names. You can call them Lao Wang or Lao Zhang. If you do not specify, the default is Db_name. Db_domain, or global_name.

These confusing names, you just have to remember that they refer to either the database or the instance, and nothing else. Which name they use depends on the target. Whether it is a request for a database, an operating system, or an external connection. If you make a clear distinction between this point, it will not be easy to mix.

End:

Thank you for reading, have a fruitful day, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report