dbv,rman检查数据文件坏块
来源:互联网 发布:热电偶数据采集器 编辑:程序博客网 时间:2024/04/29 21:53
将users01.dbf用Ultraedit修改一下模拟坏块
1:使用dbv检查坏块
[oracle@ora11g ~]$ dbv file=/u01/app/oracle/oradata/orcl/users01.dbf blocksize=8192DBVERIFY: Release 11.2.0.3.0 - Production on Thu Sep 26 16:06:35 2013Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/orcl/users01.dbfPage 138 is marked corruptCorrupt block relative dba: 0x0100008a (file 4, block 138)Bad header found during dbv: Data in bad block: type: 0 format: 0 rdba: 0x01000000 last change scn: 0x0000.00000003 seq: 0x1 flg: 0x04 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0x00033a01 check value in block header: 0x9db0 computed block checksum: 0xa2b0DBVERIFY - Verification completeTotal Pages Examined : 640Total Pages Processed (Data) : 0Total Pages Failing (Data) : 0Total Pages Processed (Index): 0Total Pages Failing (Index): 0Total Pages Processed (Other): 638Total Pages Processed (Seg) : 0Total Pages Failing (Seg) : 0Total Pages Empty : 1Total Pages Marked Corrupt : 1Total Pages Influx : 0Total Pages Encrypted : 0Highest block SCN : 13795 (0.13795)
2:使用rman检查坏块
通过校验和字段进行检查叫物理一致性检查,其侧重于硬件故障,并不关心内容正确与否,而逻辑一致性检查便是接手这任务,如:记录和索引是否对应;记录是否被不存在的事务锁定等.
db_block_checksum:物理一致性检查,当值为true时,Oracle除了会对所有表空间的数据块进行校验和检查,还会对redo log块做校验和如果置之为false,则只会对system表空间的数据块进行校验,Oracle建议开启这个参数.
db_block_checking:逻辑一致性检查当值为false时,只会对system表空间做逻辑一致性检查对性能影响比较大,需DBA自己权衡.
物理一致性检查
RMAN> validate datafile 4;Starting validate at 26-SEP-13using channel ORA_DISK_1channel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: validation complete, elapsed time: 00:00:01List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------4 OK 1 1 642 13795 File Name: /u01/app/oracle/oradata/orcl/users01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 0 Index 0 0 Other 0 639 Finished validate at 26-SEP-13
逻辑一致性检查
RMAN> VALIDATE CHECK LOGICAL DATAFILE 4;Starting validate at 26-SEP-13using channel ORA_DISK_1channel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: validation complete, elapsed time: 00:00:01List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------4 OK 1 1 642 13795 File Name: /u01/app/oracle/oradata/orcl/users01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 0 Index 0 0 Other 0 639 Finished validate at 26-SEP-13
The VALIDATE command initiates data integrity checks, logging physical, and optionally logical, block corruptions of database files and backups in the V$DATABASE_BLOCK_CORRUPTION view and the Automatic Diagnostic Repository as one or more failures. The following code shows some of the possible syntax variations.
# Check for physical corruption of all database files. VALIDATE DATABASE; # Check for physical and logical corruption of a tablespace. VALIDATE CHECK LOGICAL TABLESPACE USERS; # Check for physical and logical corruption of a datafile. VALIDATE CHECK LOGICAL DATAFILE 4; # Check for physical corruption of all archived redo logs files. VALIDATE ARCHIVELOG ALL; # Check for physical and logical corruption of the controlfile. VALIDATE CHECK LOGICAL CURRENT CONTROLFILE; # Check for physical and logical corruption of a specific backupset. VALIDATE CHECK LOGICAL BACKUPSET 3;
The
BACKUP VALIDATE
and RESTORE VALIDATE
commands perform the same checks as theVALIDATE
command for the files targeted by the backup or restore command, but they don't actually perform the specified backup or restore operation. This allows you to check the integrity of a backup or restore operation before actually performing it. The following code shows some of the possible syntax variations.# Check for physical corruption of files to be backed up.BACKUP VALIDATE DATABASE ARCHIVELOG ALL;# Check for physical and logical corruption of files to be backed up.BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;# Check for physical corruption of files to be restored.RESTORE VALIDATE DATABASE;# Check for physical and logical corruption of files to be restored.RESTORE VALIDATE CHECK LOGICAL DATABASE;
- dbv,rman检查数据文件坏块
- 使用dbv和RMAN检查数据文件中的坏块
- 数据文件坏块处理
- ORACLE模拟一个数据文件坏块并使用RMAN备份来恢复
- Oracle RMAN 坏块恢复
- 使用rman恢复坏块
- Oracle数据文件的坏块,可分为物理坏块和逻辑坏块(转)
- rman坏块的检测与恢复
- 基于rman的坏块恢复
- RMAN恢复坏块(有备份)
- 检查数据库坏块并处理
- DBV 块检测工具
- 模拟坏块及rman恢复坏块测试(一)
- 模拟坏块及rman恢复坏块测试(二)
- 基于RMAN实现坏块介质恢复(blockrecover)
- 利用RMAN检测数据库坏块的脚本
- 无RMAN备份集情况下的坏块恢复
- RMAN深入解析之--BlockRecover恢复坏块
- vsftp配置文件详解
- android DevAppsDirect开源项目
- JAVA中堆栈和内存分配原理
- linux内核--进程地址空间(一)
- 一致性哈希
- dbv,rman检查数据文件坏块
- VS2012(update3)编译Qt5.1.1 32位静态库debug-and-release版及结果分享
- oracle tkprof 工具详解
- QML学习:对象和属性
- 深入解读ESB与SOA的关系
- 创建一个别人打不开删不掉的文件夹
- '\n' 与'\r'
- FileManager 删除文件 移动并重命名文件 获取文件大小
- 数据库的范式和ACID原理