[20140424]oracle的邏輯壞塊.txt
[20140424]oracle的邏輯壞塊.txt
今天上午本來想做一個11GR2的Automatic block media repair,連結如下:http://blog.itpub.net/267265/viewspace-1148315/
但是我遇到一個奇怪的問題,檢查和的計算問題:
SYS@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SCOTT@test> select rowid,a.* from dept1 a where deptno=60;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAcC1AAIAAAACHAAA 60 MMMM DDDDDz
SCOTT@test> @lookup_rowid AAAcC1AAIAAAACHAAA
OBJECT FILE BLOCK ROW DBA TEXT
---------- ---------- ---------- ---------- -------------------- ----------------------------------------
114869 8 135 0 8,135 alter system dump datafile 8 block 135 ;
--關閉資料庫.使用bbed看檢查和.
BBED> set width 210
WIDTH 210
BBED> set dba 8,135
DBA 0x02000087 (33554567 8,135)
BBED> p *kdbr[0]
rowdata[0]
----------
ub1 rowdata[0] @8085 0x2c
BBED> x /rncc
rowdata[0] @8085
----------
flag@8085: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@8086: 0x00
cols@8087: 3
col 0[2] @8088: 60
col 1[4] @8091: MMMM
col 2[6] @8096: DDDDDz
BBED> sum
Check value for File 8, Block 135:
current = 0x8a26, required = 0x8a26
--使用bvi修改將'MMMM'替換成'AAAA'.
$ bvi -b 1105920 -s 8192 /u01/app/oracle11g/oradata/test/test01.dbf
BBED> sum
Check value for File 8, Block 135:
current = 0x8a26, required = 0x8a26
--可以發現與上面的一致,都是0x8a26.
--使用bvi修改成'BBBB'.
BBED> sum
Check value for File 8, Block 135:
current = 0x8a26, required = 0x8a26
--可以發現與上面的一致,都是0x8a26.
--使用bvi修改成'AAAM'.
BBED> sum
Check value for File 8, Block 135:
current = 0x8a26, required = 0x8626
--這個時候才出現不一致的情況.
--使用bvi修改成'1234'.
BBED> sum
Check value for File 8, Block 135:
current = 0x8a26, required = 0x8c24
--從這裡看檢查和的計算很容易出現重合的情況.
--繼續測試
SYS@test> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2228784 bytes
Variable Size 1006636496 bytes
Database Buffers 587202560 bytes
Redo Buffers 7344128 bytes
Database mounted.
Database opened.
SCOTT@test> show parameter db_block_
NAME TYPE VALUE
------------------ -------- --------
db_block_buffers integer 0
db_block_checking string FULL
db_block_checksum string FULL
db_block_size integer 8192
SCOTT@test> select rowid,a.* from dept1 a where deptno=60;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAcC1AAIAAAACHAAA 60 MMMM DDDDDz
--結果一致.
--檢視alert*.log
Hex dump of (file 8, block 135) in trace file /u01/app/oracle11g/diag/rdbms/test/test/trace/test_ora_11802_127_0_0_1.trc
Corrupt block relative dba: 0x02000087 (file 8, block 135)
Bad check value found during multiblock buffer read
Data in bad block:
type: 6 format: 2 rdba: 0x02000087
last change scn: 0x0000.c2e5d41e seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0xd41e0601
check value in block header: 0x8a26
computed block checksum: 0x602
Reading datafile '/u01/app/oracle11g/oradata/test/test01.dbf' for corruption at rdba: 0x02000087 (file 8, block 135)
Reread (file 8, block 135) found same corrupt data (no logical check)
Starting background process ABMR
Thu Apr 24 10:59:45 2014
ABMR started with pid=39, OS id=11804
Automatic block media recovery service is active.
Automatic block media recovery requested for (file# 8, block# 135)
Thu Apr 24 10:59:46 2014
Automatic block media recovery successful for (file# 8, block# 135)
Automatic block media recovery successful for (file# 8, block# 135)
--看來如果檢查和出現重合的情況,oracle無法知道該塊是否修改過,或者是邏輯損壞的.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1148366/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle上的邏輯壞塊和物理壞塊Oracle
- Oracle 11.1 邏輯壞塊Oracle
- Oracle資料庫塊的物理損壞與邏輯損壞Oracle資料庫
- [20190311]關於oracle物理與邏輯壞塊.txtOracle
- Oracle如何進行塊介質的恢復?(有邏輯壞塊是如何處理)Oracle
- 系統慢慢變壞的邏輯
- ORACLE 邏輯壞塊真實案例ORA-01578 ORA-01110Oracle
- Oracle的邏輯結構(表空間、段、區間、塊)——Oracle資料塊(二)Oracle
- oracle壞塊(二)Oracle
- Oracle資料庫壞塊(corruption)-物理壞塊Oracle資料庫
- oracle的邏輯結構Oracle
- Oracle壞塊處理Oracle
- oracle壞塊Block CorruptionsOracleBloC
- 檢查 oracle 壞塊Oracle
- ORACLE 壞塊處理Oracle
- ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr]邏輯壞塊解決ErrorAST
- [zt] Oracle的邏輯結構Oracle
- oracle 邏輯結構Oracle
- oracle壞塊問題的解決Oracle
- Oracle的邏輯結構(表空間、段、區間、塊)——表空間Oracle
- ORACLE壞塊總結(轉)Oracle
- ORACLE壞塊總結2Oracle
- oracle 壞塊問題急救Oracle
- oracle 物理讀 邏輯讀的理解Oracle
- 深入瞭解ORACLE的邏輯讀Oracle
- oracle 物理讀,邏輯讀的理解Oracle
- oracle邏輯讀過程Oracle
- Oracle邏輯讀詳解Oracle
- oracle壞塊的rowid方式修復Oracle
- oracle壞塊修復例項Oracle
- Oracle壞塊問題總結Oracle
- Oracle壞塊處理相關Oracle
- Oracle壞塊問題處理Oracle
- oracle corrupt block壞塊處理OracleBloC
- Oracle OCP(41):邏輯結構Oracle
- 什麼是oracle 邏輯讀?Oracle
- Oracle 邏輯備份 expdp/impdpOracle
- Oracle邏輯備份指令碼Oracle指令碼