【配置DATAGUARD 时的监听静态注册不成功】 问题解决
問題:
我的配置如下:
[oracle@localhost admin]$ rman target sys/oracle@stbdb
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 15 18:28:38 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.??All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
[oracle@localhost admin]$
[oracle@localhost admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-OCT-2013 18:27:51
Copyright (c) 1991, 2011, Oracle.??All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.103)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias? ?? ?? ?? ?? ?? ?? ?LISTENER
Version? ?? ?? ?? ?? ?? ? TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date? ?? ?? ?? ?? ? 15-OCT-2013 14:45:39
Uptime? ?? ?? ?? ?? ?? ???0 days 3 hr. 42 min. 12 sec
Trace Level? ?? ?? ?? ?? ?off
Security? ?? ?? ?? ?? ?? ?ON: Local OS Authentication
SNMP? ?? ?? ?? ?? ?? ?? ? OFF
Listener Parameter File? ?/opt/app/grid/network/admin/listener.ora
Listener Log File? ?? ?? ?/opt/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
??(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
??(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
??Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "stbdb" has 1 instance(s).
??Instance "stbdb", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost admin]$
[oracle@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /opt/app/oracle/product/11.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
??(SID_LIST =
? ? (SID_DESC =
? ?? ?(GLOBAL_DBNAME = stbdb)
? ?? ?(ORACLE_HOME = /opt/app/orcacle/product/11.2.0)
? ?? ?(SID_NAME = stbdb)
? ? )
??)
LISTENER =
??(DESCRIPTION_LIST =
? ? (DESCRIPTION =
? ?? ?(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.103)(PORT = 1521))
? ? )
??)
[oracle@localhost admin]$
[oracle@localhost admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/app/oracle/product/11.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
stbdb =
??(DESCRIPTION =
? ? (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.103)(PORT = 1521))
? ? (CONNECT_DATA =
? ?? ?(SERVER = DEDICATED)
? ?? ?(SERVICE_NAME = stbdb)
? ?? ?(INSTANCE_NAME= stbdb)? ?
? ? )
??)
[oracle@localhost admin]$
------------------------------------------------------------------------------
數(shù)據(jù)庫在NOMOUNT狀態(tài),各方資料都說明 使用了靜態(tài)注冊后,監(jiān)聽狀態(tài)應該是?status UNKNOWN 。
后來想到一個問題。
我是安裝了
ORACLE GRID
? ? ? ? ? ? ? ? 【】為獨立服務器配置ORACLE GRID INFRASTRUCTURE
是否靜態(tài)注冊應該放在GRID用戶下的 監(jiān)聽呢。
經(jīng)測試,還真是。
修改了/opt/app/grid/network/admin/listener.ora
[grid@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /opt/app/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
??(SID_LIST =
? ? (SID_DESC =
? ?? ?(SID_NAME = PLSExtProc)
? ?? ?(ORACLE_HOME = /opt/app/oracle/product/11.2.0)
? ?? ?(PROGRAM = extproc)
? ? )
? ? (SID_DESC =
? ?? ?(GLOBAL_DBNAME = stbdb)
? ?? ?(ORACLE_HOME= /opt/app/oracle/product/11.2.0)
? ?? ?(SID_NAME = stbdb)
? ? )
??)
LISTENER =
??(DESCRIPTION_LIST =
? ? (DESCRIPTION =
? ?? ?(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
? ?? ?(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.103 )(PORT = 1521))
? ? )
??)
ADR_BASE_LISTENER = /opt/app/oracle
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON? ? ? ? ? ? ? ? # line added by Agent
[grid@localhost admin]$
問題解決。這時監(jiān)聽的狀態(tài)如下:
[oracle@localhost admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 16-OCT-2013 10:34:11
Copyright (c) 1991, 2011, Oracle.??All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
TNS-12560: TNSrotocol adapter error
??TNS-00511: No listener
? ?Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.103)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias? ?? ?? ?? ?? ?? ?? ?LISTENER
Version? ?? ?? ?? ?? ?? ? TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date? ?? ?? ?? ?? ? 16-OCT-2013 10:30:47
Uptime? ?? ?? ?? ?? ?? ???0 days 0 hr. 3 min. 24 sec
Trace Level? ?? ?? ?? ?? ?off
Security? ?? ?? ?? ?? ?? ?ON: Local OS Authentication
SNMP? ?? ?? ?? ?? ?? ?? ? OFF
Listener Parameter File? ?/opt/app/grid/network/admin/listener.ora
Listener Log File? ?? ?? ?/opt/app/oracle/diag/tnslsnr/dg1/listener/alert/log.xml
Listening Endpoints Summary...
??(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
??(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.103)(PORT=1521)))
??(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
??Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
??Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "stbdb" has 2 instance(s).
??Instance "stbdb", status UNKNOWN, has 1 handler(s) for this service...
??Instance "stbdb", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost admin]$
有一個實例已是UNKNOWN,
但ORACLE 用戶下的監(jiān)聽 還是 status BLOCKED,沒搞明白為什么這里不支持靜態(tài)注冊?????
不用靜態(tài)注冊,使用以下方法也可以解決:
TNSNAME 配置里添加紅色字部分
stbdb =
??(DESCRIPTION =
? ? (ADDRESS_LIST =
? ? (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.103)(PORT = 1521))
? ? )
? ? (CONNECT_DATA =
? ?? ?(SERVICE_NAME = stbdb)
? ?? ?(SERVER = DEDICATED)(UR=A)
? ? )
??)
總結(jié)
以上是生活随笔為你收集整理的【配置DATAGUARD 时的监听静态注册不成功】 问题解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【ORACLE 高可用】 高级复制的两个
- 下一篇: RAC (双节点) + 单实例 DATA