8、数据库open,发现T1无法访问(出现:ORA-26040)
18:35:36 SYS@ prod>alter database open;
Database altered.
18:35:49 SYS@ prod>select count(*) from scott.t1;
select count(*) from scott.t1
*
ERROR at line 1:
ORA-01578: Oracle data block corrupted (file # 9, block # 131)
ORA-01110: data file 9: '/u01/app/oracle/oradata/prod/tbs2.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
查看告警日志:
alter database open
Beginning crash recovery of 1 threads
Started redo scan
Completed redo scan
read 83 KB redo, 26 data blocks need recovery
Started redo application at
Thread 1: logseq 4, block 117
Recovery of Online Redo Log: Thread 1 Group 1 Seq 4 Reading mem 0
Mem# 0: /dsk1/oradata/prod/redo01a.log
Mem# 1: /dsk2/oradata/prod/redo01b.log
Completed redo application of 0.02MB
Completed crash recovery at
Thread 1: logseq 4, block 284, scn 2208986
26 data blocks read, 26 data blocks written, 83 redo k-bytes read
Thu Jul 24 18:35:45 2014
Thread 1 advanced to log sequence 5 (thread open)
Thread 1 opened at log sequence 5
Current log# 2 seq# 5 mem# 0: /dsk1/oradata/prod/redo02a.log
Current log# 2 seq# 5 mem# 1: /dsk2/oradata/prod/redo02b.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Thu Jul 24 18:35:45 2014
SMON: enabling cache recovery
Successfully onlined Undo Tablespace 5.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is ZHS16GBK
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Thu Jul 24 18:35:48 2014
QMNC started with pid=20, OS id=13934
Completed: alter database open
Thu Jul 24 18:35:54 2014
Starting background process CJQ0
Thu Jul 24 18:35:54 2014
CJQ0 started with pid=23, OS id=13946
Thu Jul 24 18:36:06 2014
Errors in file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_13932.trc (incident=139383):
ORA-01578: ORACLE data block corrupted (file # 9, block # 131)
ORA-01110: data file 9: '/u01/app/oracle/oradata/prod/tbs2.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
Incident details in: /u01/app/oracle/diag/rdbms/prod/prod/incident/incdir_139383/prod_ora_13932_i139383.trc
Errors in file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_13932.trc (incident=139384):
ORA-01578: ORACLE data block corrupted (file # 9, block # 131)
ORA-01110: data file 9: '/u01/app/oracle/oradata/prod/tbs2.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
Incident details in: /u01/app/oracle/diag/rdbms/prod/prod/incident/incdir_139384/prod_ora_13932_i139384.trc
Thu Jul 24 18:36:13 2014
Trace dumping is performing id=[cdmp_20140724183613]
Thu Jul 24 18:36:14 2014
Sweep [inc][139384]: completed
Sweep [inc][139383]: completed
Sweep [inc2][139383]: completed
Trace dumping is performing id=[cdmp_20140724183617]
Thu Jul 24 18:37:14 2014
Sweep [inc2][139384]: completed
9、通过DBV验证数据文件
[oracle@rh6 ~]$ dbv file=/u01/app/oracle/oradata/prod/tbs2.dbf blocksize=8192
DBVERIFY: Release 11.2.0.1.0 - Production on Thu Jul 24 18:45:59 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/prod/tbs2.dbf
DBV-00201: Block, DBA 37748867, marked corrupt for invalid redo application
DBVERIFY - Verification complete
Total Pages Examined : 1280
Total Pages Processed (Data) : 4
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing (Index): 0
Total Pages Processed (Other): 1274
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 2
Total Pages Marked Corrupt : 1
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 2188961 (0.2188961)
在数据文件9上,出现了逻辑坏块 !
10、转储数据块
14:35:48 SYS@ prod>alter system dump datafile 9 block 131;
System altered.
数据块转储信息:
[oracle@rh6 ~]$ cat /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_2822.trc|more
Trace file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_2822.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: 29
Unix process pid: 2822, image: oracle@rh6 (TNS V1-V3)
*** 2014-07-25 14:37:54.634
*** SESSION ID:(28.16) 2014-07-25 14:37:54.634
*** CLIENT ID:() 2014-07-25 14:37:54.634
*** SERVICE NAME:(SYS$USERS) 2014-07-25 14:37:54.634
*** MODULE NAME:(sqlplus@rh6 (TNS V1-V3)) 2014-07-25 14:37:54.634
*** ACTION NAME:() 2014-07-25 14:37:54.634
Start dump data blocks tsn: 9 file#:9 minblk 131 maxblk 131
Block dump from cache:
Dump of buffer cache at level 4 for tsn=9, rdba=37748867
Block dump from disk:
buffer tsn: 9 rdba: 0x02400083 (9/131)
scn: 0x0000.00216666 seq: 0xff flg: 0x04 tail: 0x666600ff
frmt: 0x02 chkval: 0xa4e2 type: 0x00=unknown
Hex dump of block: st=0, typ_found=0
Dump of memory from 0x00007FDEF186CA00 to 0x00007FDEF186EA00
7FDEF186CA00 0000A200 02400083 00216666 04FF0000 [......@.ff!.....]
7FDEF186CA10 0000A4E2 FFFFFFFF FFFFFFFF FFFFFFFF [................]
7FDEF186CA20 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................]
Repeat 508 times
7FDEF186E9F0 FFFFFFFF FFFFFFFF FFFFFFFF 666600FF [..............ff]
End dump data blocks tsn: 9 file#: 9 minblk 131 maxblk 131
----可以看出block 131除了头部信息外,剩下的都是‘FFFFFFFF’,应该是一个逻辑坏块!