环境 oracle rac + dataguard 。
在进行连接测试时出现如下错误。
备库连接主库正常 。
主库连接备库:
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Dec 28 10:13:58 2011
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
tnsping standby 一切正常 。
TNS Ping Utility for Linux: Version 10.2.0.2.0 - Production on 28-DEC-2011 10:13:23
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.2.4.14)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =xc)))
OK (10 msec)
于是查看备库service_names 参数,发现这个参数没有配置 。
在备库设置service_names参数,问题解决 。
配置方法 :service_names='oracle_sid' (实例名称)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-714051/,如需转载,请注明出处,否则将追究法律责任。