关闭

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

标签: databaseoraclerac
2134人阅读 评论(1) 收藏 举报
分类:
关于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


1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:153732次
    • 积分:2697
    • 等级:
    • 排名:第14327名
    • 原创:111篇
    • 转载:14篇
    • 译文:1篇
    • 评论:16条
    文章分类
    最新评论