ITPUB论坛-专业的IT技术社区

标题: 检查redo日志完整性 [打印本页]

作者: lfree    时间: 2016-2-23 09:12
标题: 检查redo日志完整性
有什么方法快速检查redo日志的完整性。




作者: zergduan    时间: 2016-2-23 10:13
我觉得只能用 ALTER SYSTEM DUMP LOGFILE 的方法来验证是否完整
作者: zergduan    时间: 2016-2-23 10:14
当然如果你能archivelog也可以
作者: wmxcn2000    时间: 2016-2-23 10:57
大师,检查这个,有什么实际运用的场景吗?
作者: bluemoon0083    时间: 2016-2-23 11:18
也可以试试Health Monitor
DBMS_HM package

Redo Integrity Check
作者: maclean    时间: 2016-2-23 11:22
alter system dump logfile '/s01/oracle/product/10.2.0/db_1/flash_recovery_area/MACLEAN1/onlinelog/o1_mf_1_9f2fm8j8_.log' validate;

SQL> set timing on;

SQL> alter system dump logfile '/s01/oracle/product/10.2.0/db_1/flash_recovery_area/MACLEAN1/onlinelog/o1_mf_1_9f2fm8j8_.log' ;

alter system dump logfile '/s01/oracle/product/10.2.0/db_1/flash_recovery_area/MACLEAN1/onlinelog/o1_mf_1_9f2fm8j8_.log' validate;


System altered.

Elapsed: 00:00:16.32
SQL> SQL>
System altered.

Elapsed: 00:00:00.03
作者: lfree    时间: 2016-2-23 11:35
bluemoon0083 发表于 2016-2-23 11:18
也可以试试Health Monitor
DBMS_HM package

忘记还可以考虑这个。
作者: lfree    时间: 2016-2-23 11:57
maclean 发表于 2016-2-23 11:22
alter system dump logfile '/s01/oracle/product/10.2.0/db_1/flash_recovery_area/MACLEAN1/onlinelog/o1 ...

看来这样最简单。
作者: ZALBB    时间: 2016-2-23 13:07
RMAN 命令 VALIDATE ,
作者: zergduan    时间: 2016-2-23 13:29
ZALBB 发表于 2016-2-23 13:07
RMAN 命令 VALIDATE ,

rman是无法验证redo log的
作者: ZALBB    时间: 2016-2-23 13:59
zergduan 发表于 2016-2-23 13:29
rman是无法验证redo log的

手工归档下日志再验证了,
作者: lfree    时间: 2016-2-23 14:51
wmxcn2000 发表于 2016-2-23 10:57
大师,检查这个,有什么实际运用的场景吗?

没有,要写一个类似遇到什么问题,该如何解决的文档。

里面有这个内容,所以上问一下。
作者: lfree    时间: 2016-2-23 14:53
ZALBB 发表于 2016-2-23 13:59
手工归档下日志再验证了,

这也是一种选择,必须归档了才能执行。

RMAN> validate archivelog sequence 4830;

Starting validate at 2016-02-23 14:53:35
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=4830 RECID=1626 STAMP=904574667
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    4830    OK     0              67              /u01/app/oracle11g/archivelog/1_4830_798551880.dbf
Finished validate at 2016-02-23 14:53:39

RMAN> validate archivelog sequence 4831;

Starting validate at 2016-02-23 14:53:43
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
specification does not match any archived log in the repository
validate cancelled because there are no files to validate
Finished validate at 2016-02-23 14:53:44

作者: ZALBB    时间: 2016-2-23 15:03
lfree 发表于 2016-2-23 14:53
这也是一种选择,必须归档了才能执行。

RMAN> validate archivelog sequence 4830;

推荐这种方式,主要是RMAN自带此功能,而且也觉得确实该RMAN操心,你可以增加脚本,在检查前先归档一轮在线日志,




欢迎光临 ITPUB论坛-专业的IT技术社区 (http://www.itpub.net/) Powered by Discuz! X3.2