OCP043第七讲Dealing with Database Corruption(二)

2014-11-24 08:46:20 ? 作者: ? 浏览: 5
0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/******** directory=tmp01 dumpfile=emp.dmp tables=employees
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."EMPLOYEES" 0 KB 0 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/tmp/01/emp.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 14:17:10
analyze命令发现物理坏块
SQL> analyze table employees validate structure cascade;
analyze table employees validate structure cascade
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 5, block # 83)
ORA-01110: data file 5: '/u01/app/oradata/ora10g/example01.dbf'

[oracle@rhel6 ~]$ dbv file=/u01/app/oradata/ora10g/example01.dbf
DBVERIFY: Release 10.2.0.1.0 - Production on Tue Jul 19 16:45:21 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oradata/ora10g/example01.dbf
Page 83 is marked corrupt
Corrupt block relative dba: 0x01400053 (file 5, block 83)
Bad header found during dbv:
Data in bad block:
type: 112 format: 0 rdba: 0x206c6163
last change scn: 0x7075.72726f63 seq: 0x74 flg: 0x69
spare1: 0x79 spare2: 0x69 spare3: 0x2e2e
consistency value in tail: 0xc5232301
check value in block header: 0x6e6f
block checksum disabled

DBVERIFY - Verification complete
Total Pages Examined : 12800
Total Pages Processed (Data) : 4403
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 1322
Total Pages Failing (Index): 0
Total Pages Processed (Other): 1527
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 5547
Total Pages Marked Corrupt : 1
Total Pages Influx : 0
Highest block SCN : 9022372 (0.9022372)
db_block_checking参数设置为false代表对于非system表空间,不进行逻辑坏块检查
SQL> show parameter db_block_checking;

NAME TYPE VALUE
------------------------------------ ----------- ---------
db_block_checking string FALSE


[oracle@rhel6 ~]$ tail -f /u01/app/admin/ora10g/bdump/alert_ora10g.log
last change scn: 0x0000.003ec523 seq: 0x1 flg: 0x04
spare1: 0x31 spare2: 0x31 spare3: 0x0
consistency value in tail: 0xc5232301
check value in block header: 0x638b
computed block checksum: 0xe841
Reread of blocknum=83, file=/u01/app/oradata/ora10g/example01.dbf. found same corrupt data
Reread of blocknum=83, file=/u01/app/oradata/ora10g/example01.