Understanding of SERVICE_NAME and SID in TNSNAMES. ORA

Source: Internet
Author: User

Understanding of SERVICE_NAME and SID in TNSNAMES. ORA
SID specifies only one instance, while SERVICE_NAME specifies multiple instances in the RAC environment.
The configuration specifies the HOST of a node as follows:
RAC1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.122.12.16) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = RAC)
)
)

As follows, the instance running on 10.122.12.16 is rac1:
[Oracle @ RAC01 ~] $> 64 bytes from RAC01 (10.122.12.16): icmp_seq = 2 ttl = 64 time = 0.026 MS

--- RAC01> [oracle @ RAC01 ~] $ Ps-ef | grep ora _
Oracle 1981 1 0 Jun19? 00:02:01>
Below have more detailed explanation, Reprinted from http://www.dba-oracle.com/t_oracle_sid_instance_name_service_name.htm
Question: What> (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = TCP)
(PROTOCOL = TCP)
(HOST = 123.45.6789)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME => (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = TCP)
(PROTOCOL = TCP)
(HOST =>)
)
(CONNECT_DATA = (SID =>
NAME VALUE
-----------------------------------------------------
Db_name>
Select
> (DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST =>)
(CONNECT_DATA =
(SERVICE_NAME => (SID_LIST =
(SID_DESC =
(SID_NAME =>)
(SID_DESC =
(GLOBAL_DBNAME => (SID_NAME = mysid)
)
)
)

Global_name-If>
Select *
From
Global_name;

GLOBAL_NAME
---------------------------------------
MYSID. REMOTE. DBA. NET

Related Article

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.