一个节点rac+单节点dg网络配置(listener.ora与tnsnames.ora)

时间:2021-09-01 20:02:45

环境说明:  实验环境是 一个节点的 rac + 单机dg    (主备全部用asm存储)


tnsnames.ora  文件  (oracle用户)

node 1 :

node1-> pwd

/u01/app/oracle/product/11.2.0/db_1/network/admin
node1-> cat tnsnames.ora 


DEVDB =

 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.100)(PORT =1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = devdb)
  )
 )


devdb1 =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.10)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = devdb)
   (INSTANCE_NAME = devdb1)
  )
 )


phydb =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.15)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = phydb)
  )

 )  



dg :

phydb-> pwd
/u01/app/oracle/product/11.2.0/db_1/network/admin
phydb-> cat tnsnames.ora 

DEVDB =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.100)(PORT =1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = devdb)
  )
 )


devdb1 =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.10)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = devdb)
   (INSTANCE_NAME = devdb1)
  )
 )


phydb =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.15)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = phydb)
  )
 )  


listener.ora  文件 (grid用户)


node 1 :

node1-> pwd
/u01/app/11.2.0/grid/network/admin
node1-> cat listener.ora

LSN2 =
  (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=tcp)(HOST=10.100.25.10)(PORT=1521))
        (ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))


SID_LIST_LSN2=
   (SID_LIST=
        (SID_DESC=
          (GLOBAL_DBNAME=devdb)
          (SID_NAME=devdb1)
          (ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1)
         )
        )
       )


dg:

phydb-> pwd
/u01/app/11.2.0/grid/network/admin
phydb-> cat listener.ora


LSN2 =
  (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=tcp)(HOST=10.100.25.15)(PORT=1521))
        (ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))


SID_LIST_LSN2=
   (SID_LIST=
        (SID_DESC=
          (GLOBAL_DBNAME=phydb)
          (SID_NAME=phydb)
          (ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1)
         )
        )
       )