首先listener.ora配置如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /orainst/product/10/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = enovia)
(ORACLE_HOME = /orainst/product/10/db_1)
(SID_NAME = enovia)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.30.2.37)(PORT = 1521))
)
数据库关闭状态:
$ lsnrctl stop
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:54:40
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
The command completed successfully
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:54:53
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
$ lsnrctl start
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:54:59
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /orainst/product/10/db_1/bin/tnslsnr: please wait...
TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
System parameter file is /orainst/product/10/db_1/network/admin/listener.ora
Log messages written to /orainst/product/10/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date 31-MAR-2011 15:54:59
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /orainst/product/10/db_1/network/admin/listener.ora
Listener Log File /orainst/product/10/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "enovia" has 1 instance(s).
Instance "enovia", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:55:56
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date 31-MAR-2011 15:54:59
Uptime 0 days 0 hr. 0 min. 57 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /orainst/product/10/db_1/network/admin/listener.ora
Listener Log File /orainst/product/10/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "enovia" has 1 instance(s).
Instance "enovia", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
数据库处于nomount状态:
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 5033164800 bytes
Fixed Size 2027776 bytes
Variable Size 1124077312 bytes
Database Buffers 3892314112 bytes
Redo Buffers 14745600 bytes
SQL> !
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:57:14
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date 31-MAR-2011 15:54:59
Uptime 0 days 0 hr. 2 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /orainst/product/10/db_1/network/admin/listener.ora
Listener Log File /orainst/product/10/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "enovia" has 2 instance(s).
Instance "enovia", status UNKNOWN, has 1 handler(s) for this service...
Instance "enovia", status BLOCKED, has 1 handler(s) for this service...
Service "enovia_XPT" has 1 instance(s).
Instance "enovia", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
数据库处于mount状态:
SQL> alter database mount;
Database altered.
SQL> !
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:58:46
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date 31-MAR-2011 15:54:59
Uptime 0 days 0 hr. 3 min. 46 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /orainst/product/10/db_1/network/admin/listener.ora
Listener Log File /orainst/product/10/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "enovia" has 2 instance(s).
Instance "enovia", status UNKNOWN, has 1 handler(s) for this service...
Instance "enovia", status READY, has 1 handler(s) for this service...
Service "enovia_XPT" has 1 instance(s).
Instance "enovia", status READY, has 1 handler(s) for this service...
The command completed successfully
数据库处于打开状态:
SQL> alter database open;
Database altered.
SQL> !
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 31-MAR-2011 15:59:48
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.2.37)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date 31-MAR-2011 15:54:59
Uptime 0 days 0 hr. 4 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /orainst/product/10/db_1/network/admin/listener.ora
Listener Log File /orainst/product/10/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.37)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "enovia" has 2 instance(s).
Instance "enovia", status UNKNOWN, has 1 handler(s) for this service...
Instance "enovia", status READY, has 1 handler(s) for this service...
Service "enoviaXDB" has 1 instance(s).
Instance "enovia", status READY, has 1 handler(s) for this service...
Service "enovia_XPT" has 1 instance(s).
Instance "enovia", status READY, has 1 handler(s) for this service...
The command completed successfully
了解Oracle 监听动态注册与静态注册