Linux下啟動Oracle11g數據庫監聽問題的解決
安裝環境:
ORACLE_HOME = /home/oracle/oracle/product/11.2.0/db_1
ORACLE_HOME/network/admin/listener.ora文件如下:
[plain]
# listener.ora Network Configuration File: /home/oracle/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
www.2cto.com
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = sqtest)
(ORACLE_HOME = /home/oracle/oracle/product/11.2.0/db_1)
(SID_NAME = sqtest)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = drum)(PORT = 1521))
)
ADR_BASE_LISTENER = /home/oracle/oracle
ORACLE_HOME/network/admin/tnsnames.ora文件如下:
[plain]
# tnsnames.ora Network Configuration File: /home/oracle/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
www.2cto.com
sqltest =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = sqtest)
)
)
執行lsnrctl start,結果如下:
[plain]
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /home/oracle/oracle/diag/tnslsnr/drum/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=drum.smartquick.com.cn)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=drum)(PORT=1521)))
STATUS of the LISTENER www.2cto.com
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 27-JUL-2012 14:48:11
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/drum/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=drum.smartquick.com.cn)(PORT=1521)))
Services Summary...
Service "sqtest" has 1 instance(s).
Instance "sqtest", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
在sqlplus下執行以下命令修復注冊實例,
sqlplus / as sysdba
www.2cto.com
startup
alter system register;
再執行lsnrctl status命令,顯示如下信息
[plain]
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-JUL-2012 14:53:28
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=drum)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 27-JUL-2012 14:48:11
Uptime 0 days 0 hr. 5 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/drum/listener/alert/log.xml www.2cto.com
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=drum.smartquick.com.cn)(PORT=1521)))
Services Summary...
Service "sqtest" has 2 instance(s).
Instance "sqtest", status UNKNOWN, has 1 handler(s) for this service...
Instance "sqtest", status READY, has 1 handler(s) for this service...
Service "sqtestXDB" has 1 instance(s).
Instance "sqtest", status READY, has 1 handler(s) for this service...
The command completed successfully
發現數據庫實例已經注冊監聽成功。
關閉的步驟如下:
www.2cto.com
sqlplus下執行
shutdown
exit
在系統命令行執行
lsnrctl stop
作者 whyonly