Oracle 10 启动监听程序与你同行(oracle10开启监听)

Oracle 10: 启动监听程序与你同行

Oracle 10是一个功能强大的数据库管理系统,它支持多用户、多任务和高性能的处理。为了让Oracle 10正常工作,需要启动监听程序。本文将介绍如何启动监听程序,以保证Oracle 10的正常工作。

第一步:检查监听程序状态

在开始启动监听程序前,需要先检查监听程序的状态。命令如下:

lsnrctl status

如果监听程序未启动,将返回类似以下内容:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(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=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-APR-2021 16:12:10
Uptime 0 days 0 hr. 10 min. 39 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "XE" has 1 instance(s).
Instance "XE", 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...
The command completed successfully

第二步:启动监听程序

如果监听程序未启动,需要使用以下命令启动它:

lsnrctl start

该命令将会输出以下内容:

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wt…
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-APR-2021 16:43:12
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
The command completed successfully

此时,监听程序已经成功启动。

第三部:检查监听程序状态

在启动监听程序后,需要再次检查监听程序的状态,以确保它已经正常工作。可以使用以下命令检查监听程序状态:

lsnrctl status

如果监听程序已经成功启动,将会输出类似如下内容:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 22-APR-2021 16:43:12
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "XE" has 1 instance(s).
Instance "XE", 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...
The command completed successfully

如果监听程序未能成功启动,可能会输出错误信息,需要根据错误信息去修复相关问题。

总结

启动监听程序是Oracle 10的重要步骤之一,监听程序能够保证Oracle 10的正常工作。在本文中,我们介绍了如何启动监听程序,并检查它的状态。虽然本文仅介绍了Oracle 10的方法,但是其它版本的Oracle也是类似的。通过这篇文章,相信读者已经掌握了启动监听程序的基本方法,让我们一起开启Oracle 10之旅!


数据运维技术 » Oracle 10 启动监听程序与你同行(oracle10开启监听)