这里将告诉您oracle 监听(多实例监听配置),教程操作步骤:
三种情况:
1、一个监听在一个IP一个端口上监听多个实例
2、一个监听在一个IP不同端口上监听多个实例
3、多个监听监听多个实例
情况1:
listener.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#listener.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1NETWORKADMINlistener.ora
#GeneratedbyOracleconfigurationtools.
SID_LIST_ORCL=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=ORCL)
(SID_NAME=ORCL)
)
(SID_DESC=
(GLOBAL_DBNAME=NHL)
(SID_NAME=NHL)
)
)
ORCL=
(DESCRIPTION_LIST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
)
(DESCRIPTION=
(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
)
)
tnsnames.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#tnsnames.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1networkadmintnsnames.ora
#GeneratedbyOracleconfigurationtools.
NHL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=NHL)
)
)
ORCL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=orcl)
)
)
情况2:
listener.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#listener.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1NETWORKADMINlistener.ora
#GeneratedbyOracleconfigurationtools.
SID_LIST_ORCL=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=ORCL)
(SID_NAME=ORCL)
)
(SID_DESC=
(GLOBAL_DBNAME=NHL)
(SID_NAME=NHL)
)
)
ORCL=
(DESCRIPTION_LIST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
)
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1522))
)
(DESCRIPTION=
(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
)
)
tnsnames.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#tnsnames.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1networkadmintnsnames.ora
#GeneratedbyOracleconfigurationtools.
NHL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1522))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=NHL)
)
)
ORCL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=orcl)
)
)
情况3:
listener.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#listener.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1NETWORKADMINlistener.ora
#GeneratedbyOracleconfigurationtools.
SID_LIST_ORCL=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=ORCL)
(SID_NAME=ORCL)
)
(SID_DESC=
(GLOBAL_DBNAME=NHL)
(SID_NAME=NHL)
)
)
SID_LIST_TEST=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=TEST)
(SID_NAME=TEST)
)
)
ORCL=
(DESCRIPTION_LIST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
)
(DESCRIPTION=
(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
)
)
TEST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1523))
)
tnsnames.ora文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#tnsnames.oraNetworkConfigurationFile:E:appproduct11.2.0dbhome_1networkadmintnsnames.ora
#GeneratedbyOracleconfigurationtools.
NHL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1522))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=NHL)
)
)
ORCL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=orcl)
)
)
TEST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.152.131)(PORT=1523))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=test)
)
)
改完配置并启动
oracle 监听(多实例监听配置)就为您介绍到这里,感谢您关注懒咪学编程c.lanmit.com.
本文地址:https://c.lanmit.com/shujuku/qita/20167.html