Oracle 双监听器的配置
2012-12-10 21:58
253 查看
以Oracle Net看,数据库服务器可能也是客户端
因为tnsnames.ora可以有服务器的描述
也就是,只有监听器才会一直是服务器
实例:监听=n:m
㈠ 双监听器的好处:
① 客户端故障转移--CF
② 客户端负载均衡--CLB
㈡ 注意事项:
① 要保证1521端口可用,否则,OEM将不可用,须emca重配
② 非标端口使用静态注册是个比较好的实践
配置案例:[oracle@localhost admin]$ cat listener.ora
think =
(DESCRIPTION =
(load_balance = on)
(failover = on)
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1521)
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1522)
)
)
)
SID_LIST_think =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)))
water =
(DESCRIPTION =
(load_balance = on)
(failover = on)
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1521))
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1522))
)
)
)
SID_LIST_water =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)))
[oracle@localhost admin]$ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:47:22
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(load_balance=on)(failover=on)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 10-DEC-2012 20:02:23
Uptime 0 days 1 hr. 44 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance(s).
Instance "emrep", status READY, has 1 handler(s) for this service...
Service "emrep_XPT.us.oracle.com" has 1 instance(s).
Instance "emrep", status READY, has 1 handler(s) for this service...
The command completed successfully
如果1521和1522并存,在业务不繁忙时,listener进程只会使用1521
[oracle@localhost admin]$ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:48:45
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(load_balance=on)(failover=on)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias water
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 10-DEC-2012 21:24:17
Uptime 0 days 0 hr. 24 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/water.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1522)))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance(s).
Instance "emrep", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
㈢ 测试
① tnsping[oracle@localhost admin]$ tnsping water
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:53:13
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS=(PROTOCOL= tcp)(HOST= 192.168.1.113)(PORT= 1522)) (CONNECT_DATA=(SERVICE_NAME= emrep.us.oracle.com)))
OK (10 msec)
② netstat[oracle@localhost admin]$ netstat -lntp| grep :15
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 8524/tnslsnr
tcp 0 0 192.168.1.113:1522 0.0.0.0:* LISTEN 9826/tnslsnr
③ connsys@EMREP> conn u1/u1@water
Connected.
因为tnsnames.ora可以有服务器的描述
也就是,只有监听器才会一直是服务器
实例:监听=n:m
㈠ 双监听器的好处:
① 客户端故障转移--CF
② 客户端负载均衡--CLB
㈡ 注意事项:
① 要保证1521端口可用,否则,OEM将不可用,须emca重配
② 非标端口使用静态注册是个比较好的实践
配置案例:[oracle@localhost admin]$ cat listener.ora
think =
(DESCRIPTION =
(load_balance = on)
(failover = on)
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1521)
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1522)
)
)
)
SID_LIST_think =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)))
water =
(DESCRIPTION =
(load_balance = on)
(failover = on)
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1521))
(ADDRESS=(PROTOCOL = tcp)(HOST= 192.168.1.113)(PORT= 1522))
)
)
)
SID_LIST_water =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)))
[oracle@localhost admin]$ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:47:22
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(load_balance=on)(failover=on)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 10-DEC-2012 20:02:23
Uptime 0 days 1 hr. 44 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance(s).
Instance "emrep", status READY, has 1 handler(s) for this service...
Service "emrep_XPT.us.oracle.com" has 1 instance(s).
Instance "emrep", status READY, has 1 handler(s) for this service...
The command completed successfully
如果1521和1522并存,在业务不繁忙时,listener进程只会使用1521
[oracle@localhost admin]$ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:48:45
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(load_balance=on)(failover=on)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias water
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 10-DEC-2012 21:24:17
Uptime 0 days 0 hr. 24 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/water.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1522)))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance(s).
Instance "emrep", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
㈢ 测试
① tnsping[oracle@localhost admin]$ tnsping water
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 10-DEC-2012 21:53:13
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS=(PROTOCOL= tcp)(HOST= 192.168.1.113)(PORT= 1522)) (CONNECT_DATA=(SERVICE_NAME= emrep.us.oracle.com)))
OK (10 msec)
② netstat[oracle@localhost admin]$ netstat -lntp| grep :15
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 8524/tnslsnr
tcp 0 0 192.168.1.113:1522 0.0.0.0:* LISTEN 9826/tnslsnr
③ connsys@EMREP> conn u1/u1@water
Connected.
相关文章推荐
- ArcSDE10.1配置Oracle 监听器来使用SQL操作ST_Geometry(个人改动版)
- Oracle 监听器日志配置与管理
- oracle监听器配置
- Oracle 监听器日志配置与管理
- oracle配置多个监听器
- oracle,已知IP和SERVICENAME配置监听器
- Oracle Databse 11g 监听器配置服务的名称自解
- Oracle 11g2的监听器配置教程
- oracle监听器和本地服务配置(有图哟)
- Oracle监听器Server端与Client端配置实例
- oracle监听器(listener)配置心得
- oracle监听器配置
- oracle监听器与本地服务配置的关联
- Linux下配置Oracle监听器
- oracle监听器(listener)配置心得
- Oracle监听器日志配置与管理
- 配置oracle的监听器
- maven项目:spring配置里:连接远程oracle(虚拟机里),【虚拟机没开启(数据库连接不上)导致tomcat启动失败(web.xml配置Spring了监听器)】=(也不报具体错误,就是超时)
- 认识oracle监听器配置文件
- Oracle监听器Server端与Client端配置实例