配置静态监听解决ORA-12514错误的案例(四)

2014-11-24 12:27:21 · 作者: · 浏览: 4
(SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) )
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = std)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) )
注意,加上的内容中,SID_NAME,即instance_name,而GLOBAL_DBNAME,即tnsnames.ora中的SERVICE_NAME,由于tnsnames.ora中的SERVICE_NAME都是prd,因此这里的两个名字是一样的,不会有什么影响,把修改好的文件替换掉原文件,再重新加载监听文件
SQL> ! [oracle@prd ~]$ lsnrctl reload
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-OCT-2014 12:55:17
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prd)(PORT=1521))) The command completed successfully [oracle@prd ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-OCT-2014 12:55:24
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prd)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 08-OCT-2014 10:34:51 Uptime 0 days 2 hr. 20 min. 33 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=prd)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "prd" has 2 instance(s). Instance "prd", status UNKNOWN, has 1 handler(s) for this service... Instance "prd", status READY, has 1 handler(s) for this service... Service "prdXDB" has 1 instance(s). Instance "prd", status READY, has 1 handler(s) for this service... Service "prd_XPT" has 1 instance(s). Instance "prd", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@prd ~]$
注意,这个UNKNOW的prd实例对应的服务名prd就是刚才我们通过静态监听发现的服务名,同那样地,备库也重新加载监听:
[oracle@std ~]$ lsnrctl reload
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-OCT-2014 12:57:15
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=std)(PORT=1521))) The command completed successfully [oracle@std ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-OCT-2014 12:57:25
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=std)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 08-OCT-2014 09:41:41 Uptime 0 days 3 hr. 15 min. 44 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=std)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "prd" has 1 instan