Home Database Mysql Tutorial RMAN深入解析之--BlockRecover恢复坏块

RMAN深入解析之--BlockRecover恢复坏块

Jun 07, 2016 pm 02:52 PM
recover go deep parse

RMAN深入解析之--BlockRecover恢复坏块 案例环境: 操作系统:RedHat EL5 Oracle: Oracle 11gR2 案例描述: 通过块介质恢复(Block Media Recover:BMR)执行块级别的恢复操作来修复Oracle数据库上的逻辑或物理上损坏的数据块。 1、模拟数据块被破坏 10:26:48

RMAN深入解析之--BlockRecover恢复坏块

案例环境:

操作系统:RedHat EL5

Oracle:  Oracle 11gR2


案例描述:

   通过块介质恢复(Block Media Recover:BMR)执行块级别的恢复操作来修复Oracle数据库上的逻辑或物理上损坏的数据块。

1、模拟数据块被破坏

10:26:48 SYS@ prod>conn scott/tiger
Connected.
10:26:51 SCOTT@ prod>select * from tab;
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
EMP1                           TABLE
SALGRADE                       TABLE
Elapsed: 00:00:00.10
10:26:55 SCOTT@ prod>
10:27:37 SYS@ prod>desc dba_segments
 Name                                                              Null?    Type  
 ----------------------------------------------------------------- -------- -------------
 OWNER                                                                      VARCHAR2(30)
 SEGMENT_NAME                                                               VARCHAR2(81)
 PARTITION_NAME                                                             VARCHAR2(30)
 SEGMENT_TYPE                                                               VARCHAR2(18)
 SEGMENT_SUBTYPE                                                            VARCHAR2(10)
 TABLESPACE_NAME                                                            VARCHAR2(30)
 HEADER_FILE                                                                NUMBER
 HEADER_BLOCK                                                               NUMBER
 BYTES                                                                      NUMBER
 BLOCKS                                                                     NUMBER
 EXTENTS                                                                    NUMBER
 INITIAL_EXTENT                                                             NUMBER
 NEXT_EXTENT                                                                NUMBER
 MIN_EXTENTS                                                                NUMBER
 MAX_EXTENTS                                                                NUMBER
 MAX_SIZE                                                                   NUMBER
 RETENTION                                                                  VARCHAR2(7)
 MINRETENTION                                                               NUMBER
 PCT_INCREASE                                                               NUMBER
 FREELISTS                                                                  NUMBER
 FREELIST_GROUPS                                                            NUMBER
 RELATIVE_FNO                                                               NUMBER
 BUFFER_POOL                                                                VARCHAR2(7)
 FLASH_CACHE                                                                VARCHAR2(7)
 CELL_FLASH_CACHE                                                           VARCHAR2(7)
10:27:41 SYS@ prod>col segment_name for a20       
10:27:59 SYS@ prod>select owner,segment_name,SEGMENT_TYPE,HEADER_BLOCK from dba_segments      
10:29:06   2   where owner='SCOTT' and segment_name='EMP1';
OWNER                          SEGMENT_NAME         SEGMENT_TYPE       HEADER_BLOCK
------------------------------ -------------------- ------------------ ------------
SCOTT                          EMP1                 TABLE                       170
Copy after login

通过以上查询,可以知道EMP1 table的segment header block为170;利用Uedit32,打开数据文件(users01.dbf)进行编辑破坏!


以下是计算block 170和block 171在Uedit32编辑中的offset:

10:29:24 SYS@ prod>select to_char(170*8*1024, 'xxxxxxxxxxxxxxxxxxxxx') from dual;

TO_CHAR(170*8*1024,'XX

----------------------

154000


10:30:27 SYS@ prod>select to_char(171*8*1024, 'xxxxxxxxxxxxxxxxxxxxx') from dual;

TO_CHAR(171*8*1024,'XX

----------------------

156000

以下是Uedit32编辑users01.dbf图片:

650) this.width=650;" title="b1.png" alt="wKiom1PE2QPyNrhYAAlanMynL8w838.jpg" />

通过转储数据块验证:

10:30:37 SYS@ prod>alter system dump datafile 4 block 170;

System altered.


[oracle@rh6 ~]$ ls -lt /u01/app/oracle/diag/rdbms/prod/prod/trace/|more

total 14300

-rw-r----- 1 oracle oinstall    4492 Jul 15 11:34 prod_ora_2883.trc
-rw-r----- 1 oracle oinstall      69 Jul 15 11:34 prod_ora_2883.trm
-rw-r----- 1 oracle oinstall  557756 Jul 15 10:17 alert_prod.log
-rw-r----- 1 oracle oinstall     947 Jul 15 10:17 prod_ckpt_2541.trc
-rw-r----- 1 oracle oinstall      59 Jul 15 10:17 prod_ckpt_2541.trm
-rw-r----- 1 oracle oinstall    1783 Jul 15 10:12 prod_j000_2588.trc
-rw-r----- 1 oracle oinstall      80 Jul 15 10:12 prod_j000_2588.trm
Copy after login

查看转储文件:

[oracle@rh6 ~]$ cat /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_2883.trc|more

Trace file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_2883.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1
System name:    Linux
Node name:      rh6
Release:        2.6.32-358.el6.x86_64
Version:        #1 SMP Tue Jan 29 11:47:41 EST 2013
Machine:        x86_64
Instance name: prod
Redo thread mounted by this instance: 1
Oracle process number: 26
Unix process pid: 2883, image: oracle@rh6 (TNS V1-V3)
*** 2014-07-15 11:34:50.092
*** SESSION ID:(37.32) 2014-07-15 11:34:50.092
*** CLIENT ID:() 2014-07-15 11:34:50.092
*** SERVICE NAME:(SYS$USERS) 2014-07-15 11:34:50.092
*** MODULE NAME:(sqlplus@rh6 (TNS V1-V3)) 2014-07-15 11:34:50.092
*** ACTION NAME:() 2014-07-15 11:34:50.092
 
Start dump data blocks tsn: 4 file#:4 minblk 170 maxblk 170
Block dump from cache:
Dump of buffer cache at level 4 for tsn=4, rdba=16777386
Block dump from disk:
buffer tsn: 4 rdba: 0x010000aa (4/170)
scn: 0x0000.001f891c seq: 0x02 flg: 0x04 tail: 0x891c2302
frmt: 0x02 chkval: 0x8eee type: 0x23=PAGETABLE SEGMENT HEADER
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x00007F7DFC5C7A00 to 0x00007F7DFC5C9A00
Copy after login

7F7DFC5C7A00 0000A223 010000AA 001F891C 04020000 [#...............]

---此行内容与Uedit32打开内容一致

7F7DFC5C7A10 00008EEE 00000000 00000000 00000000  [................]
7F7DFC5C7A20 00000000 00000001 00000008 00000A9C  [................]
7F7DFC5C7A30 00000000 00000008 00000008 010000B0  [................]
7F7DFC5C7A40 00000000 00000000 00000000 00000008  [................]
7F7DFC5C7A50 00000000 00000000 00000000 00000000  [................]
7F7DFC5C7A60 00000008 00000008 010000B0 00000000  [................]
7F7DFC5C7A70 00000000 00000000 00000008 010000A8  [................]
7F7DFC5C7A80 010000A8 00000000 00000000 00000000  [................]
7F7DFC5C7A90 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
7F7DFC5C7AD0 00000001 00002000 00000000 00001434  [..... ......4...]
7F7DFC5C7AE0 00000000 010000A9 00000001 010000A8  [................]
7F7DFC5C7AF0 010000A9 00000000 00000000 00000000  [................]
7F7DFC5C7B00 00000000 00000000 00000001 00000000  [................]
7F7DFC5C7B10 0001257B 10000000 010000A8 00000008  [{%..............]
7F7DFC5C7B20 00000000 00000000 00000000 00000000  [................]
        Repeat 152 times
7F7DFC5C84B0 010000A8 010000AB 00000000 00000000  [................]
7F7DFC5C84C0 00000000 00000000 00000000 00000000  [................]
        Repeat 151 times
7F7DFC5C8E40 00000000 00000000 010000A9 00000000  [................]
7F7DFC5C8E50 00000000 00000000 00000000 00000000  [................]
        Repeat 185 times
7F7DFC5C99F0 00000000 00000000 00000000 891C2302  [.............#..]
  Extent Control Header
  -----------------------------------------------------------------
  Extent Header:: spare1: 0      spare2: 0      #extents: 1      #blocks: 8     
                  last map  0x00000000  #maps: 0      offset: 2716  
      Highwater::  0x010000b0  ext#: 0      blk#: 8      ext size: 8     
  #blocks in seg. hdr's freelists: 0     
  #blocks below: 8     
  mapblk  0x00000000  offset: 0     
                   Unlocked
  --------------------------------------------------------
  Low HighWater Mark : 
      Highwater::  0x010000b0  ext#: 0      blk#: 8      ext size: 8     
  #blocks in seg. hdr's freelists: 0     
  #blocks below: 8     
  mapblk  0x00000000  offset: 0     
  Level 1 BMB for High HWM block: 0x010000a8
  Level 1 BMB for Low HWM block: 0x010000a8
  --------------------------------------------------------
  Segment Type: 1 nl2: 1      blksz: 8192   fbsz: 0      
  L2 Array start offset:  0x00001434
  First Level 3 BMB:  0x00000000
  L2 Hint for inserts:  0x010000a9
  Last Level 1 BMB:  0x010000a8
  Last Level II BMB:  0x010000a9
  Last Level III BMB:  0x00000000
     Map Header:: next  0x00000000  #extents: 1    obj#: 75131  flag: 0x10000000
  Inc # 0 
  Extent Map
  -----------------------------------------------------------------
   0x010000a8  length: 8     
  
  Auxillary Map
  --------------------------------------------------------
   Extent 0     :  L1 dba:  0x010000a8 Data dba:  0x010000ab
  --------------------------------------------------------
  
   Second Level Bitmap block DBAs 
   --------------------------------------------------------
   DBA 1:   0x010000a9
  
End dump data blocks tsn: 4 file#: 4 minblk 170 maxblk 170
Copy after login

2、将Uedit32(通过16进制编辑功能)编辑过的数据文件上传到数据库

13:59:58 SYS@ prod>alter system flush buffer_cache;

System altered.

读取数据出错:

14:00:05 SYS@ prod>select * from scott.emp1;
select * from scott.emp1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 170)
ORA-01110: data file 4: '/u01/app/oracle/oradata/prod/users01.dbf'
Copy after login

验证数据文件:

[oracle@rh6 ~]$ dbv file=/u01/app/oracle/oradata/prod/users01.dbf blocksize=8192

DBVERIFY: Release 11.2.0.1.0 - Production on Tue Jul 15 13:59:41 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/prod/users01.dbf
Page 170 is marked corrupt
Corrupt block relative dba: 0x010000aa (file 4, block 170)
Bad check value found during dbv: 
Data in bad block:
 type: 35 format: 2 rdba: 0x010000aa
 last change scn: 0x0000.001f891c seq: 0x2 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x891c2302
 check value in block header: 0x8eee
 computed block checksum: 0x2020
Page 171 is marked corrupt
Corrupt block relative dba: 0x010000ab (file 4, block 171)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020ab
 last change scn: 0x2020.201f890b seq: 0x2 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x890b0602
 check value in block header: 0xcf8b
 computed block checksum: 0x2e00
Page 172 is marked corrupt
Corrupt block relative dba: 0x010000ac (file 4, block 172)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020ac
 last change scn: 0x2020.201f891c seq: 0x3 flg: 0x06
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x891c0603
 check value in block header: 0xa5b1
 computed block checksum: 0x0
Page 173 is marked corrupt
Corrupt block relative dba: 0x010000ad (file 4, block 173)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020ad
 last change scn: 0x2020.201f891c seq: 0x1 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x891c0601
 check value in block header: 0xf6ab
 computed block checksum: 0x2020
Page 174 is marked corrupt
Corrupt block relative dba: 0x010000ae (file 4, block 174)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020ae
 last change scn: 0x2020.201f891c seq: 0x1 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x891c0601
 check value in block header: 0xcef0
 computed block checksum: 0x20
Page 175 is marked corrupt
Corrupt block relative dba: 0x010000af (file 4, block 175)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020af
 last change scn: 0x2020.201f891c seq: 0x1 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x891c0601
 check value in block header: 0x146a
 computed block checksum: 0x0
Page 176 is marked corrupt
Corrupt block relative dba: 0x010000b0 (file 4, block 176)
Bad header found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x012020b0
 last change scn: 0x2020.201e6219 seq: 0x1 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x62190601
 check value in block header: 0x2185
 computed block checksum: 0x2020
Copy after login

DBVERIFY - Verification complete

Total Pages Examined : 12800

Total Pages Processed (Data) : 757

Total Pages Failing (Data) : 0

Total Pages Processed (Index): 2

Total Pages Failing (Index): 0

Total Pages Processed (Other): 12024

Total Pages Processed (Seg) : 0

Total Pages Failing (Seg) : 0

Total Pages Empty : 10

Total Pages Marked Corrupt : 7

Total Pages Influx : 0

Total Pages Encrypted : 0

Highest block SCN : 2066716 (0.2066716)

从以上验证结果看:总共有7个数据块(170-176)被破坏!


3、利用RMAN进行修复

[oracle@rh6 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 15 14:02:16 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: PROD (DBID=239333010)

RMAN> list backup of database;

using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
17      Full    1.13G      DISK        00:01:21     03-JUL-14      
        BP Key: 17   Status: AVAILABLE  Compressed: NO  Tag: TAG20140703T171545
        Piece Name: /u01/app/oracle/product/11.2.0/db_1/dbs/0lpcfu61_1_1
  List of Datafiles in backup set 17
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/system01.dbf
  2       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  3       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/undotbs1.dbf
  4       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/users01.dbf
  5       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/example01.dbf
  6       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/tbs1.dbf
  7       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/undotbs2.dbf
  8       Full 2066885    03-JUL-14 /u01/app/oracle/oradata/prod/perftbs01.dbf
Copy after login


RMAN> blockrecover datafile 4 block 170,171,172,173,174,175,176;

Starting recover at 15-JUL-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00004
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/db_1/dbs/0lpcfu61_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/db_1/dbs/0lpcfu61_1_1 tag=TAG20140703T171545
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01
starting media recovery
media recovery complete, elapsed time: 00:00:07
Finished recover at 15-JUL-14
Copy after login

恢复完成,验证:

RMAN> backup validate database;

Starting backup at 15-JUL-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/prod/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/prod/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/prod/perftbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/prod/users01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/prod/example01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/prod/undotbs2.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/prod/tbs1.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/prod/undotbs1.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              13407        99852           2117516   
  File Name: /u01/app/oracle/oradata/prod/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              67302           
  Index      0              15344           
  Other      0              3787            
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              17342        66627           2117514   
  File Name: /u01/app/oracle/oradata/prod/sysaux01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              11719           
  Index      0              7882            
  Other      0              29617           
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              1            128             2056342   
  File Name: /u01/app/oracle/oradata/prod/undotbs1.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              127             
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              11873        12800           2066716   
  File Name: /u01/app/oracle/oradata/prod/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              763             
  Index      0              2               
  Other      0              162             
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              1680         12804           1715036   
  File Name: /u01/app/oracle/oradata/prod/example01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              3987            
  Index      0              1132            
  Other      0              6001            
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6    OK     0              2            1281            2051631   
  File Name: /u01/app/oracle/oradata/prod/tbs1.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1               
  Index      0              0               
  Other      0              1277            
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
7    OK     0              8833         12800           2117516   
  File Name: /u01/app/oracle/oradata/prod/undotbs2.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              3967            
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
8    OK     0              23967        25600           2006072   
  File Name: /u01/app/oracle/oradata/prod/perftbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              867             
  Index      0              261             
  Other      0              505             
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Control File OK     0              594             
Finished backup at 15-JUL-14
Copy after login
[oracle@rh6 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 15 14:16:27 2014
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
14:16:27 SYS@ prod>select count(*) from scott.emp1;
  COUNT(*)
----------
        28
Elapsed: 00:00:00.02
14:16:35 SYS@ prod>select * from scott.emp1;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
28 rows selected.
Elapsed: 00:00:00.07
Copy after login

读取数据成功!


[oracle@rh6 ~]$ dbv file=/u01/app/oracle/oradata/prod/users01.dbf blocksize=8192

DBVERIFY: Release 11.2.0.1.0 - Production on Tue Jul 15 14:17:22 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/prod/users01.dbf
DBVERIFY - Verification complete
Total Pages Examined         : 12800
Total Pages Processed (Data) : 763
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 2
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 12025
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 10
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 2066716 (0.2066716)
[oracle@rh6 ~]$
Copy after login

4、查看告警日志信息


告警日志:

dbv校验生成的日志

Reading datafile '/u01/app/oracle/oradata/prod/users01.dbf' for corruption at rdba: 0x010000aa (file 4, block 170)
Reread (file 4, block 170) found same corrupt data
Corrupt Block Found
         TSN = 4, TSNAME = USERS
         RFN = 4, BLK = 170, RDBA = 16777386
         OBJN = -1, OBJD = 75131, OBJECT = USERS, SUBOBJECT = 
         SEGMENT OWNER = , SEGMENT TYPE = Temporary Segment
Tue Jul 15 14:00:25 2014
Trace dumping is performing id=[cdmp_20140715140025]
Tue Jul 15 14:00:25 2014
Errors in file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_m000_8954.trc  (incident=121488):
ORA-01578: ORACLE data block corrupted (file # 4, block # 170)
ORA-01110: data file 4: '/u01/app/oracle/oradata/prod/users01.dbf'
Hex dump of (file 4, block 176) in trace file /u01/app/oracle/diag/rdbms/prod/prod/incident/incdir_121443/prod_m000_8954_i121443_a.trc
Corrupt block relative dba: 0x010000b0 (file 4, block 176)
Bad header found during validation
Data in bad block:
 type: 6 format: 2 rdba: 0x012020b0
 last change scn: 0x2020.201e6219 seq: 0x1 flg: 0x04
 spare1: 0x20 spare2: 0x20 spare3: 0x2020
 consistency value in tail: 0x62190601
 check value in block header: 0x2185
 computed block checksum: 0x2020
Reread of blocknum=176, file=/u01/app/
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to restore chat spark on TikTok How to restore chat spark on TikTok Mar 16, 2024 pm 01:25 PM

On Douyin, a short video platform full of creativity and vitality, we can not only enjoy a variety of exciting content, but also have in-depth communications with like-minded friends. Among them, chat sparks are an important indicator of the intensity of interaction between the two parties, and they often inadvertently ignite the emotional bonds between us and our friends. However, sometimes due to some reasons, the chat spark may be disconnected. So what should we do if we want to restore the chat spark? This tutorial guide will bring you a detailed introduction to the content strategy, hoping to help everyone. How to restore the spark of Douyin chat? 1. Open the Douyin message page and select a friend to chat. 2. Send messages and chat to each other. 3. If you send messages continuously for 3 days, you can get the spark logo. On a 3-day basis, send pictures or videos to each other

How to restore Xiaomi Cloud photo album to local How to restore Xiaomi Cloud photo album to local Feb 24, 2024 pm 03:28 PM

How to restore Xiaomi Cloud Photo Album to local? You can restore Xiaomi Cloud Photo Album to local in Xiaomi Cloud Photo Album APP, but most friends don’t know how to restore Xiaomi Cloud Photo Album to local. The next step is to restore Xiaomi Cloud Photo Album to local. Local method graphic tutorials, interested users come and take a look! How to restore Xiaomi cloud photo album to local 1. First open the settings function in Xiaomi phone and select [Personal Avatar] on the main interface; 2. Then enter the Xiaomi account interface and click the [Cloud Service] function; 3. Then jump to Xiaomi For the function of cloud service, select [Cloud Backup]; 4. Finally, in the interface as shown below, click [Cloud Album] to restore the album to local.

Detailed explanation of Oracle error 3114: How to solve it quickly Detailed explanation of Oracle error 3114: How to solve it quickly Mar 08, 2024 pm 02:42 PM

Detailed explanation of Oracle error 3114: How to solve it quickly, specific code examples are needed. During the development and management of Oracle database, we often encounter various errors, among which error 3114 is a relatively common problem. Error 3114 usually indicates a problem with the database connection, which may be caused by network failure, database service stop, or incorrect connection string settings. This article will explain in detail the cause of error 3114 and how to quickly solve this problem, and attach the specific code

How to recover deleted emmo diary How to recover deleted emmo diary Feb 27, 2024 pm 04:40 PM

Emmo Diary is a software specially designed for recording your mood. It provides you with a private diary space, allowing you to record important or trivial things every day. Through unique emotion recognition technology, Emmo Diary can also help you better understand and deal with your emotions. But sometimes I find that my diary has been deleted by mistake and I don’t know how to restore it. So this tutorial guide will bring you a detailed recovery guide, hoping to help everyone in need. How can emmo retrieve his previous diary? 1. Click the [Settings] icon in the lower left corner of the emmo selection screen to enter; 2. Select the [Data Backup and Restore] icon on the screen and enter the operation.

How to restore deleted comments on Xiaohongshu? Any tips for deleted comments? How to restore deleted comments on Xiaohongshu? Any tips for deleted comments? Mar 27, 2024 am 11:56 AM

Xiaohongshu is a popular social e-commerce platform where users can share shopping experiences, life details, etc. During use, some users may experience their comments being deleted. So, how to restore deleted comments on Xiaohongshu? 1. How to restore deleted comments on Xiaohongshu? If it is found that a comment has been deleted by mistake, users can choose to wait for the official Xiaohongshu team to restore it. In this case, it’s best to be patient and wait as the official team may automatically process and resume comments after a while. If you find that a comment has been deleted, consider republishing similar content. But when reposting, please make sure the content complies with Xiaohongshu’s community guidelines to avoid being removed again. 3. Contact Xiaohongshu customer service: If you think your comment has been mistakenly

Parsing Wormhole NTT: an open framework for any Token Parsing Wormhole NTT: an open framework for any Token Mar 05, 2024 pm 12:46 PM

Wormhole is a leader in blockchain interoperability, focused on creating resilient, future-proof decentralized systems that prioritize ownership, control, and permissionless innovation. The foundation of this vision is a commitment to technical expertise, ethical principles, and community alignment to redefine the interoperability landscape with simplicity, clarity, and a broad suite of multi-chain solutions. With the rise of zero-knowledge proofs, scaling solutions, and feature-rich token standards, blockchains are becoming more powerful and interoperability is becoming increasingly important. In this innovative application environment, novel governance systems and practical capabilities bring unprecedented opportunities to assets across the network. Protocol builders are now grappling with how to operate in this emerging multi-chain

How to recover deleted notes on Xiaomi phone How to recover deleted notes on Xiaomi phone Mar 20, 2024 pm 09:16 PM

How to recover deleted sticky notes on Xiaomi mobile phones? Editing notes on Xiaomi mobile phones may accidentally delete them, but most users don’t know how to recover deleted sticky notes. Next is the graphic tutorial on how to recover deleted sticky notes on Xiaomi mobile phones brought by the editor. , interested users come and take a look! Xiaomi mobile phone usage tutorial How to restore deleted Xiaomi mobile phone notes 1. First, use the sticky notes function in Xiaomi mobile phone and enter the main page; 2. Then find the [Notes] guided by the arrow shown in the figure below on the main page; 3. Then it will expand In the function bar, select [Trash]; 4. Then on the Trash function page, find the note file you want to restore and click it; 5. Finally, expand the latest window at the bottom and click [Restore].

Analysis of the meaning and usage of midpoint in PHP Analysis of the meaning and usage of midpoint in PHP Mar 27, 2024 pm 08:57 PM

[Analysis of the meaning and usage of midpoint in PHP] In PHP, midpoint (.) is a commonly used operator used to connect two strings or properties or methods of objects. In this article, we’ll take a deep dive into the meaning and usage of midpoints in PHP, illustrating them with concrete code examples. 1. Connect string midpoint operator. The most common usage in PHP is to connect two strings. By placing . between two strings, you can splice them together to form a new string. $string1=&qu

See all articles