脚本安装完数据库后,没有设置监听,因为直接使用动态监听,启动时报错

查看状态
[oracle@dxtdb] :lsnrctl status LSNRCTL
for Linux: Version 11.2.0.4.0 - Production on 08-SEP-2022 10:01:53 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12535: TNS:operation timed out TNS-12560: TNS:protocol adapter error

原因是没有关闭防火墙。关闭防火墙后,启动成功。

[oracle@dxtdb] :lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 08-SEP-2022 10:02:04

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/dxtdb/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                08-SEP-2022 10:02:04
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/dxtdb/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The listener supports no services
The command completed successfully

这里没有监听到实例数据库,因为没有启动数据库,直接startup数据库就能监听到。

数据库和监听启动顺序是有讲究的,如果先启动监听,数据库再启动,则可以立刻监听到数据库,如果先启动数据库再启动监听,则可能要等一分钟时间才能监听到,也可以使用sql语句alter system register;手动注册监听,也能立刻监听到。

posted on 2022-09-08 10:13  牛肉丨火锅  阅读(352)  评论(0编辑  收藏  举报