问题:
我的配置如下:
[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]$
------------------------------------------------------------------------------
数据库在NOMOUNT状态,各方资料都说明 使用了静态注册后,监听状态应该是 status UNKNOWN 。
后来想到一个问题。
我是安装了
ORACLE GRID
【】为独立服务器配置ORACLE GRID INFRASTRUCTURE
是否静态注册应该放在GRID用户下的 监听呢。
经测试,还真是。
修改了/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]$
问题解决。这时监听的状态如下:
[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 用户下的监听 还是 status BLOCKED,没搞明白为什么这里不支持静态注册?????
不用静态注册,使用以下方法也可以解决:
TNSNAME 配置里添加红色字部分
stbdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.103)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = stbdb)
(SERVER = DEDICATED)(UR=A)
)
)