windows环境下手工创建oracle数据库监听
windows环境下手工创建oracle数据库监听
查看当前的服务名:
NAME TYPE VALUE
cell_offloadgroup_name string
db_file_name_convert string
db_name string ORCL
db_unique_name string ORCL
global_names boolean FALSE
instance_name string orcl
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string ORCL
第一步:修改 listenr.ora 文件 ,增加新的监听配置
LISTENER4 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-BE6GDNT)(PORT = 1528))
)
)
ADR_BASE_LISTENER4 = D:appzhou
第二步:启动监听
lsnrctl start LISTENER4
日志记录如下:
C:Windowssystem32>lsnrctl start LISTENER4
LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 31-MAY-2024 12:19:07
Copyright © 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:appzhouproduct11.2.0dbhome_1networkadminlistener.ora
Log messages written to D:appzhoudiagtnslsnrDESKTOP-BE6GDNTlistener4alertlog.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:appzhouproduct11.2.0dbhome_1networkadminlistener.ora
Listener Log File D:appzhoudiagtnslsnrDESKTOP-BE6GDNTlistener4alertlog.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;