It is easy to understand that a company is likened to a server, and the database is a department in the company.
1.SID: A database can have multiple instances (such as RAC), and the SID is used to identify the name of each instance within the database,
It's like a department where everyone has a name of their own.
2.service_name: It is the name of the database, the outside people want to connect my database,
You write the service_name on the client connection string. It's like a department name, and the name of the department is registered with the Janitor (listener),
The janitor look at you is to find service_name this department, tell you that our company does have this department, so you found, the connection was established.
In a word, the SID is internal and is a name of the instance level that is used internally for salutation. Service_Name is external,
is a database-level name used to tell the outside people that my database is called "service_name".
You can use the service_name parameter to specify what the name is, you can have more than one name, name casually, called the dog eggs, Cui Huadu does not matter.
If you do not specify, the default is db_name. Db_domain, Global_name.
The database, and Oracle_sid, is telling the OS system what I call this example. These easy-to-confuse names, you have to remember,
They do not refer to the database, that is, the example, there are two things, nothing else. The specific name they use is to see for whom,
What the occasion was. Whether it is for the database, the operating system, or the external link. Just as you are to your parents, you have a small name, son;
For the students, you have a nickname called the light bulb, to the office, you have a regular name called Wang Xiaoming. But in the final analysis, it is one thing. It is not easy to confuse this point.
Oracle Instance name/service name What's the difference between Sid and Service_Name?