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

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

36

积分

0

好友

0

主题
1#
发表于 2012-5-25 19:15:52 | 查看: 4731| 回复: 3
最近在测试DataGuard功能,从库在启用自动恢复的时候可以使用以下两个语句来实现:

1、alter database recover managed standby database disconnect from session;
2、alter database recover managed standby database using current logfile disconnect from session;

启动1只能是做到日志归档之后才能进行数据恢复,2能够实时的恢复数据;但是今天同事说如果使用2这种方式的话,假如网络出现中断的话,容易出现数据丢失的情况,请问刘大是不是这个情况。另外能不能请刘大说明下这两个语句之间的区别啦?
2#
发表于 2012-5-25 20:46:59
要使用alter database recover managed standby database using current logfile disconnect from session;
做恢复的话,物理备库需要建立standby redolog,这个是与主库的redo log同步的文件。所谓的使用主库在线日志做恢复。
如你所说,alter database recover managed standby database disconnect from session;使用归档日志做恢复。
使用在线日志的话,最好是运行在最大可用性模式,数据库默认在最大性能模式,建议调整。

回复 只看该作者 道具 举报

3#
发表于 2012-5-26 23:11:26
1.  这位同事 关于 数据丢失的观点 不知道具体是基于那个文档或者那个经验?

据我所知 在传输归档日志或者redo的过程中,若因为network error造成的 corrupt 会 由RFS通过检测 redo log block header发现,且这种传输一般是基于TCP协议的, 可以参考 http://www.oracledatabase12g.com ... g-block-header.html

ORA-00354 corrupt redo log block header
Cause: The block header on the redo block indicated by the accompanying error is not valid. The block number and time-stamp are given in an accompanying message.

Action: Perform recovery with a good version of the redo log or perform cancel-based recovery up to, but not including, the corrupted redo log file. If this happens when archiving, archiving of the problem log can be skipped by clearing the log with the UNARCHIVED option. This must be followed by a backup of every datafile to insure recoverability of the database.

回复 只看该作者 道具 举报

4#
发表于 2012-5-26 23:18:03
FOR Question 2

区别在于后者使用了 real-time apply 特性, real -time apply是 10g data guard新特性, 用以减少delay延迟时间,和更快地switchover/failover

Real Time apply

Redo data is applied to the standby database as soon as it is received from the primary database
Without this support, apply has to wait till an archivelog is created on the standby database
Enables real-time reporting, faster switchovers/failovers
For Redo Apply:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE
For SQL Apply:
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE
When real time apply is enabled, RECOVERY_MODE column in V$ARCHIVE_DEST_STATUS displays “MANAGED REAL TIME APPLY”

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-11-15 18:06 , Processed in 0.058461 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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