linux7.9更改主机名导致监听无法启动
[oracle@qyy ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-APR-2021 17:40:39
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 29-APR-2021 17:40:11
Uptime 0 days 0 hr. 0 min. 27 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/qyy/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.72.2)(PORT=1521)))
The listener supports no services
The command completed successfully
root用户切换至/u01/app/oracle/product/11.2.0/db_1/network/admin/目录下,vi修改listener.ora文件
添加一下内容
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(SID_NAME = orcl)
)
其中orcl根据实际的数据库实例名填写
切换到Oracle用户下,lsnrctl reload
然后lsnrctl stop lsnrctl start 恢复正常