由于某种原因导致数据库监听启动失败,需要重新创建监听。
过程如下:
第一步:修改 listenr.ora 文件 ,增加新的监听配置
LISTENER4 =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-BE6GDNT)(PORT = 1528))))ADR_BASE_LISTENER4 = D:\app\zhou
第二步:启动监听
lsnrctl start LISTENER4日志记录如下:
C:\Windows\system32>lsnrctl start LISTENER4LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 31-MAY-2024 12:19:07Copyright (c) 1991, 2013, Oracle. All rights reserved.Starting tnslsnr: please wait...Failed to open service <OracleOraDb11g_home1TNSListenerLISTENER4>, error 1060.
TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
System parameter file is D:\app\zhou\product\11.2.0\dbhome_1\network\admin\listener.ora
Log messages written to D:\app\zhou\diag\tnslsnr\DESKTOP-BE6GDNT\listener4\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-BE6GDNT)(PORT=1528)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-BE6GDNT)(PORT=1528)))
STATUS of the LISTENER
------------------------
Alias LISTENER4
Version TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
Start Date 31-MAY-2024 12:19:13
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\app\zhou\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File D:\app\zhou\diag\tnslsnr\DESKTOP-BE6GDNT\listener4\alert\log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-BE6GDNT)(PORT=1528)))
The listener supports no services
The command completed successfully
第三步:配置 tnsnames.ora 内容,注册服务
scimdb4 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-BE6GDNT)(PORT = 1528))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = SCIMSDB)))
第四步:注册服务
alter system set local_listener='scimdb2','scimdb3','scimdb4';
alter system register;