环境:Linux AS 4.7 + Oracle10g
一次的异常断电事故,导致Oracle数据库监听启动不起来,不如下错误:
[oracle@dbserv ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 10:50:13
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /var/oracle/product/10.2.0/database/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
[@more@]LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
查看listener文件内容,属于正常:
[oracle@dbserv admin]$ more listener.ora
# listener.ora Network Configuration File: /var/oracle/product/10.2.0/database/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /var/oracle/product/10.2.0/database)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserv)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
在图形桌面环境,通过netca删除并重建数据库监听(LISTENER),但启动监听还是报同样的错误。
查看了hosts文件内容,发现127.0.0.1前面有注释:
[oracle@dbserv admin]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 aaa1.test.com
128.129.99.49 dbserv
改为如下后,启动监听发现恢复正常:
[oracle@dbserv ~]$ vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
128.129.99.49 dbserv
[oracle@dbserv ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 11:11:09
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /var/oracle/product/10.2.0/database/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /var/oracle/product/10.2.0/database/network/admin/listener.ora
Log messages written to /var/oracle/product/10.2.0/database/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserv)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 11-JUL-2012 11:11:10
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /var/oracle/product/10.2.0/database/network/admin/listener.ora
Listener Log File /var/oracle/product/10.2.0/database/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserv)(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...
The command completed successfully
查看监听状态,可以看出,已经正常了:
[oracle@dbserv ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2012 11:13:23
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 11-JUL-2012 11:11:10
Uptime 0 days 0 hr. 2 min. 12 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /var/oracle/product/10.2.0/database/network/admin/listener.ora
Listener Log File /var/oracle/product/10.2.0/database/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserv)(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 "exam" has 1 instance(s).
Instance "exam", status READY, has 1 handler(s) for this service...
Service "examXDB" has 1 instance(s).
Instance "exam", status READY, has 1 handler(s) for this service...
Service "exam_XPT" has 1 instance(s).
Instance "exam", status READY, has 1 handler(s) for this service...
The command completed successfully
另外,如下文件也值得查看一下:
[oracle@dbserv ~]$ more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dbserv
[oracle@dbserv ~]$
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/18841027/viewspace-1058788/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/18841027/viewspace-1058788/