脚本安装完数据库后,没有设置监听,因为直接使用动态监听,启动时报错
查看状态
[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;手动注册监听,也能立刻监听到。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构