环境说明: 实验环境是 一个节点的 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)
)
)
)
本文转自 张冲andy 博客园博客,原文链接:http://www.cnblogs.com/andy6/p/6530048.html ,如需转载请自行联系原作者