oracle 最全的监听、tnsnames.ora格式

监听:

scan 监听:

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by 
Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
 
SID_LIST_LISTENER_SCAN1 =  
             (SID_LIST =
               (SID_DESC =       
                 (SID_NAME = PLSExtProc)
                 (ORACLE_HOME = /oracle/app/product/112040/db_1)
                 (PROGRAM = extproc)
               )
               (SID_DESC=         
                  (GLOBAL_DBNAME=htbase)  
                  (ORACLE_HOME=/oracle/app/product/112040/db_1)  
                  (SID_NAME=htbase1)   
                )
               (SID_DESC=         
                  (GLOBAL_DBNAME=htbase)  
                  (ORACLE_HOME=/oracle/app/product/112040/db_1)  
                  (SID_NAME=htbase2)   
                )
             )

[root@raclhr-11gR2-N2 .oracle]# cat /u01/app/11.2.0/grid/network/admin/listener.ora
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent

LISTENER_SCAN1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.174)(PORT = 1521))
    )
  )

SID_LIST_LISTENER_SCAN1 =
(SID_LIST =
    (SID_DESC =
     (GLOBAL_DBNAME = lhrrac1)
     (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
     (SID_NAME = lhrrac12)
    )
    (SID_DESC =
     (GLOBAL_DBNAME = lhrrac1)
     (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
     (SID_NAME = lhrrac11)
    )
 )

普通监听1

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = wlh2)
      (SID_NAME = wlh2)
      (ORACLE_HOME = /oracle/app/product/11.2.0/db_1)
    )
  )
 
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.211.55.91)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

普通监听2

DBRA =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 155.155.10.31)(PORT = 1522))
      )
    )
  )
SID_LIST_DBRA =
 (SID_LIST =
  (SID_DESC =
      (GLOBAL_DBNAME = bsorcl)
      (ORACLE_HOME = /oracle/app/product/112040/db_1)
      (SID_NAME = bsorcl1)
    )
  (SID_DESC =
      (GLOBAL_DBNAME = htbase)
      (ORACLE_HOME = /oracle/app/product/112040/db_1)
      (SID_NAME = htbase1)
    )
)

TNS

普通tns

orcl =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.88.200)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

普通2

TEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 155.155.10.35)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = htbase)
    )
  )

连sid

ii =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.83.50)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = lll)
      (INSTANCE_NAME=zmh)
    )
  )

rac版单节点tns

###################备端一节点连接串#########################
EMRDB_DG1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 155.155.10.31)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = htbase)
      (INSTANCE_NAME=htbase1)
    )
  )

scan版本tns

server是独占模式或者共享模式(DEDICATED/ SHARED)
HTBASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 155.155.10.35)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = htbase)
    )
  )
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汪灵骅

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值