Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

53

积分

0

好友

3

主题
1#
发表于 2012-5-5 00:16:35 | 查看: 5145| 回复: 2
如果DG的主库发生故障,从库切换成主库。
服务名和ip地址都变了,怎么能够在不影响应用的情况下切换?

有人提出使用tnsname的timeout机制来切换。
但是如果应用用的JDBC或者连接池,这个怎么能实现呢?

A和B是一套DG。由于故障,把B变成主,应用能自动连到B吗?

[ 本帖最后由 zhm2815 于 2012-5-5 08:32 编辑 ]
2#
发表于 2012-5-5 20:02:23
data guard 和 jdbc  thin client 支持 connect time failover

In my simple scenario, I have one Primary Database (prima) and one Physical Standby Database (physt). On my downloads page, you may find an installation guide for that scenario for 10g and for 11g. After a switchover or after a failover, the primary is going to be physt. The challenge is now to get the connect from the client side to the right (primary) database. That is called Connect Time Failover and is achieved as follows:

First, we make sure that the client uses a tnsnames.ora with a connect descriptor that uses a SERVICE_NAME instead of a SID

MYAPP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HostA)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = HostB)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = myapp)
)
)

HostA is the host on which prima runs, HostB has physt running.


你可以参考 这2个帖子:

http://uhesse.com/2009/08/19/con ... ver-for-data-guard/
http://www.freelists.org/post/or ... connection-question,11

回复 只看该作者 道具 举报

3#
发表于 2012-5-7 15:35:35
感谢刘大!
那也就是光靠DG是不行的,必须DBA干预才可以了。

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-15 13:53 , Processed in 0.115398 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569