关于TNSNAMES.ORA中SERVICE_NAME,SID的一点理解
关于TNSNAMES.ORA中SERVICE_NAME,SID的一点理解
SID只指定一个实例,而SERVICE_NAME在RAC环境中指定多个实例。
如下,该配置指定了一个节点的HOST:
RAC1 =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 10.122.12.16)(PORT = 1521))
 )
 (CONNECT_DATA =
 (SERVICE_NAME = RAC)
 )
 )
 
如下,运行在10.122.12.16的实例是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>
以下有更详细的解释,转载自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


阅读更多
文章标签: database oracle rac
个人分类: RAC
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

关于TNSNAMES.ORA中SERVICE_NAME,SID的一点理解

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭