|
环境如下:
主机名 IP地址 操作系统版本 数据库版本
rac01 eth0: 192.168.37.101/eth1: 10.4.16.101 linux5.6-32bit 11gR2
rac02 eth0: 192.168.37.102/eth1: 10.4.16.102 linux5.6-32bit 11gR2
2个主机的/etc/hosts:
# public ip
192.168.37.101 rac01
192.168.37.102 rac02
# virtual ip
192.168.37.103 rac01-vip
192.168.37.104 rac02-vip
# private ip
10.4.16.101 rac01-pvt
10.4.16.102 rac02-pvt
# scan vip
192.168.37.220 rac-cluster-scan
2个主机的tns:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
/u01/app/11.2.0/grid/network/admin/tnsnames.ora
都是:
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
rac01: lsnrctl status如下:
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
rac02的lsnrctl status
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
问题来了:
1. emca创建时提示tns问题, 但是在emca过程中又没有地方可以设置tns串。
[oracle@rac01 ~]$ emca -config dbcontrol db -repos create -cluster
EMCA 开始于 2017-12-5 11:06:05
EM Configuration Assistant, 11.2.0.3.0 正式版
版权所有 (c) 2003, 2011, Oracle。保留所有权利。
输入以下信息:
数据库的唯一名称: orcl
服务名: orcl
监听程序端口号: 1521
监听程序 ORACLE_HOME [ /u01/app/11.2.0/grid ]:
SYS 用户的口令:
DBSNMP 用户的口令:
SYSMAN 用户的口令:
集群名称: rac-cluster
通知的电子邮件地址 (可选):
通知的发件 (SMTP) 服务器 (可选):
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]:
ASM 端口 [ 1521 ]: 1521
ASM 用户名 [ ASMSNMP ]: ASMSNMP
ASM 用户口令:
2017-12-5 11:06:28 oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
警告: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor |
|