时间:2021-07-01 10:21:17 帮助过:22人阅读
vim tnsnames.ora
#tnsnames.ora所在的那台客户端认为在15212能找到注册服务,若不能找到就连不上。
RCAT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15212))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rcat.example.com)
)
)
#tnsnames.ora所在的那台客户端认为在15212能找到注册服务,若不能找到就连不上。
RCAT2
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15213))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rcat.example.com)
)
)
#动态注册FOR15212
FOR15212 =
(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15212))
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15213))
)
)
#tiger是给win客户端写的条目,负载均衡静态15212和15213这两个监听端口
TIGER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15212))
(ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 15213))
(LOAD_BALANCE = yes )
)
(CONNECT_DATA =
(SERVICE_NAME = rcat.example.com)
)
)
#以上需要使其动态注册生效,需要进sqlplus修改配置
. oraenv
rcat
sqlplus /nolog
conn /as sysdba
alter system set local_listener=FOR15212;
alter register; #更快的让监听器动态注册,不然得等待2分钟以上
. oraenv
+ASM
sqplus /nolog
conn /as sysdba
alter system set local_listener=FOR15212;
#以上需要使其动态注册生效,需要进sqlplus修改配置
. oraenv
rcat
sqlplus /nolog
conn /as sysdba
alter system set local_listener=FOR15212;
alter system register; #更快的让监听器动态注册,不然得等待2分钟以上
. oraenv
+ASM
sqplus /nolog
conn /as sysdba
alter system set local_listener=FOR15212;
alter system register; #更快的让监听器动态注册,不然得等待2分钟以上
#更快的让监听器动态注册,不然得等待2分钟以上
以上结束后查看LISTENER监听器状态
[oracle@station90 admin]$ lsnrctl services LISTENER;
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-SEP-2016 23:16:52
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=station90.example.com)(PORT=15212)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service... #是动态注册出现的
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "rcat.example.com" has 2 instance(s).
Instance "rcat", status UNKNOWN, has 1 handler(s) for this service... #是静态注册出现的
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "rcat", status READY, has 1 handler(s) for this service... #是动态注册出现的
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "rcatXDB.example.com" has 1 instance(s). #是动态注册出现的隐含服务,XMLDB
Instance "rcat", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: station90.example.com, pid: 12730>
(ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=44903))
The command completed successfully
L2监听器的状态
[oracle@station90 admin]$ lsnrctl services l2
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-SEP-2016 23:19:08
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=station90.example.com)(PORT=15213)))
Services Summary...
Service "rcat.example.com" has 2 instance(s).
Instance "rcat", status UNKNOWN, has 1 handler(s) for this service... #是静态注册出现的
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "rcat", status READY, has 1 handler(s) for this service... #是动态注册出现的
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "rcatXDB.example.com" has 1 instance(s).
Instance "rcat", status READY, has 1 handler(s) for this service... #是动态注册出现的隐含服务,XMLDB
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: station90.example.com, pid: 12730>
(ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=44903))
The command completed successfully
小提示:crossdver软件可以让WINDOWNS程序装在linux上
本文出自 “Oracle个人学习笔记” 博客,请务必保留此出处http://wuchunqiang.blog.51cto.com/1022331/1851414
Oracle学习笔记之第六节网络介绍及配置,会话
标签:listener tnsname