RAC环境中的tnsnames.ora配置文件:
# tnsnames.ora Network Configuration File: /opt/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CRMDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb2_vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = crmdb)
(INSTANCE_NAME = crmdb2)
)
)
CRMDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb1_vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = crmdb)
(INSTANCE_NAME = crmdb1)
)
)
CRMDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb1_vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb2_vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = crmdb)
)
)
LISTENERS_CRMDB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb1_vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb2_vip)(PORT = 1521))
)
======================================================
RAC环境中的listener.ora配置文件:
# listener.ora.crmdb1 Network Configuration File: /opt/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.crmdb1
# Generated by Oracle configuration tools.
LISTENER_CRMDB1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb1_vip)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.6)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
======================================================
连接RAC数据库的客户端tnsnames.ora配置文件:
# tnsnames.ora Network Configuration File: /u01/app/oracle/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CRMDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.7)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = crmdb)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
======================================================
RAC环境中的local_listener和remote_listener的值:
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 12 01:48:46 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter list
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENERS_CRMDB
remote_listener string LISTENERS_CRMDB
阅读(2345) | 评论(0) | 转发(0) |