Difference between SERVICE_NAME, Sid and schema

Source: Internet
Author: User

1. Sid is the name of an Oracle instance. Instance name refers to the name of the database management system used to respond to a database operation. The instance name is determined by the instance_name parameter of the initialization parameter file. If this parameter is not specified (instance_name is not specified as any value), the Instance name is determined by the user's environmental variable oracle_sid (note that this parameter is in upper case. On Windows, the oracle_sid value in the registry is determined.

Sid is the unique name of an Oracle instance. When a user accesses a database, the user actually sends a request to an oracle instance. The Oracle instance obtains data from the database. Oracle instance = memory structure + background process, so the Oracle instance is temporary; you can start the instance by startup nomount, but note that the Oracle database is not started at this time, you need to use open to start the database;
One instance can correspond to only one database, and one Database can use multiple instances;

 

 

2. SERVICE_NAME refers to the global database name in listener: this name is determined by the global_dbname parameter in listener. ora. This name indicates the value of the SERVICE_NAME parameter in tnsnames. ora when the client connects to the database.

Global_dbname = dbname. dbdomain

 

 

3. connection string

When configuring tnsname. ora, you can use Sid or SERVICE_NAME. Note that these two values are not necessarily the same, depending on the configuration in the database server.

 

Connect_str =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = xx. xx) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = xxxx
)
)

 

 

Connect_str =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = xx. xx) (Port = 1521 ))
)
(CONNECT_DATA =
(SID = xxx)
(Server = dedicated)
)
)

 

4. schema namespace

A namespace defines a set of object types. In a namespace, the object name must be unique. Of course, the same name can be used in different namespaces. Objects such as table, view, sequence, and package share a namespace, so the same namespace cannot have the same one. Objects such as indexes, constraints, and triggers have their own namespaces, so they can have the same names.

 

Generally, the schema is user-based. If you create a user in the database, a Shema with the same user name is created.

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.