标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,875)
- DB2 (22)
- MySQL (82)
- Oracle (1,701)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (72)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (658)
- Oracle安装升级 (107)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (90)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
-
最近发表
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
- 几乎动用了所有手段的Oracle故障恢复
- Oracle Block Edit Tool (obet) 功能增强–2026.07
- Oracle 19c 202607补丁(RUs+OJVM)-19.32
- Patch_SCN快速修复ORA-01555数据库open故障
- 快速处理 ORA-01210: data file header is media corrupt 故障
- ORA-00314: log 3 of thread 1, expected sequence# N doesn’t match 0
- 记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理
- 需要注意:dbv 检测controlfile可能不准
- 达梦数据库redo异常强制拉库
- dd破坏包含50多个pdb的asm 磁盘组恢复
标签归档:obet修复坏块
obet快速修复oracle 位图损坏块
近期有客户由于虚拟化平台系统负载过高,重启之后导致数据库出现一些坏块

其中被框起来的坏块比较好处理,属于数据库中间某个对象的block,对异常对象进行处理即可,但是有一个block 2,block 10 这种都属于数据文件中位图块(用来记录哪些block被使用,哪些block是没有使用),这种block如果损坏会导致该文件无法分配新的空间(也不能回收空间,无法统计表空间使用情况等)


alert日志有大量报错

对于这种情况,直接使用obet的坏块修复功能
OBET> set file 116 filename set to: /oradata/NNC_DATA207.dbf (file# 116) endian auto-detected: little OBET> set block 10 block set to: 10 OBET> backup Backing up file #116, block 10 Successfully backed up block 10 from /oradata/NNC_DATA207.dbf to backup_blk/NNC_DATA207.dbf.10_20260902200547.blk OBET> repair block Warning: Missing value for 'block', using global setting: 10 Repairing block 10 in file /oradata/NNC_DATA207.dbf... Repair analysis for block 10: 1. seq_kcbh check: 0xFF -> needs repair (0x01) 2. Tailchk check: 0x00001EFF -> needs repair (0x00001E01) 3. Checksum check: 0xCBC7 -> OK Confirm repair operations: File: /oradata/NNC_DATA207.dbf Block: 10 Operations needed: fix offset14, fix tailchk Confirm? (Y/YES to proceed): y Verification after repair: 1. seq_kcbh: 0x01 OK 2. Tailchk: 0x00001E01 OK 3. Checksum: 0xCBC7 OK Block 10 repair completed successfully. OBET> OBET> set file 119 filename set to: /oradata/NNC_DATA210.dbf (file# 119) endian auto-detected: little OBET> set block 2 block set to: 2 OBET> backup Backing up file #119, block 2 Successfully backed up block 2 from /oradata/NNC_DATA210.dbf to backup_blk/NNC_DATA210.dbf.2_20260902200645.blk OBET> repair block Warning: Missing value for 'block', using global setting: 2 Repairing block 2 in file /oradata/NNC_DATA210.dbf... Repair analysis for block 2: 1. seq_kcbh check: 0xFF -> needs repair (0x01) 2. Tailchk check: 0x00001DFF -> needs repair (0x00001D01) 3. Checksum check: 0x80EC -> OK Confirm repair operations: File: /oradata/NNC_DATA210.dbf Block: 2 Operations needed: fix offset14, fix tailchk Confirm? (Y/YES to proceed): y Verification after repair: 1. seq_kcbh: 0x01 OK 2. Tailchk: 0x00001D01 OK 3. Checksum: 0x80EC OK Block 2 repair completed successfully. OBET> exit Exiting OBET.
使用dbv检测,位图坏块全部修复
[oracle@nccdb ~]$ dbv file=/oradata/NNC_DATA210.dbf DBVERIFY: Release 11.2.0.4.0 - Production on Wed Sep 2 20:07:15 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - Verification starting : FILE = /oradata/NNC_DATA210.dbf DBVERIFY - Verification complete Total Pages Examined : 4194302 Total Pages Processed (Data) : 3472440 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 205988 Total Pages Failing (Index): 0 Total Pages Processed (Other): 515867 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 7 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Total Pages Encrypted : 0 Highest block SCN : 751241252 (22.751241252) [oracle@nccdb ~]$ dbv file=/oradata/NNC_DATA207.dbf DBVERIFY: Release 11.2.0.4.0 - Production on Wed Sep 2 20:08:23 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - Verification starting : FILE = /oradata/NNC_DATA207.dbf DBVERIFY - Verification complete Total Pages Examined : 4194302 Total Pages Processed (Data) : 3471468 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 204185 Total Pages Failing (Index): 0 Total Pages Processed (Other): 518642 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 7 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Total Pages Encrypted : 0 Highest block SCN : 751241266 (22.751241266)
kcratr_nab_less_than_odr和system坏块故障处理
学校客户由于机房断电,导致数据库异常.现场工程师进行了现场备份,然后尝试强制拉库,结果没有成功,大概报错和操作过程如下:
断电之后启动数据库,数据库报ORA-600 kcratr_nab_less_than_odr故障解决错误,这个是一种非常常见的操作,一般是由于写丢失导致,以前有过很多类似恢复经历:
ORA-600 kcratr_nab_less_than_odr故障解决
差点被误操作的ORA-600 kcratr_nab_less_than_odr故障
ORA-600 kcratr_nab_less_than_odr和ORA-600 2662故障处理
ORA-600 kcratr_nab_less_than_odr和ORA-600 4193故障处理
Tue Aug 18 23:59:19 2026 ALTER DATABASE OPEN This instance was first to open Beginning crash recovery of 2 threads parallel recovery started with 19 processes Started redo scan Completed redo scan read 21634 KB redo, 800 data blocks need recovery Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_275950.trc (incident=703037): ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6916], [3], [4], [], [], [], [] Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl2/incident/incdir_703037/orcl2_ora_275950_i703037.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Abort recovery for domain 0 Aborting crash recovery due to error 600 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_275950.trc: ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6916], [3], [4], [], [], [], [] Abort recovery for domain 0 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_275950.trc: ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6916], [3], [4], [], [], [], [] ORA-600 signalled during: ALTER DATABASE OPEN...
现场恢复人员上来之后,直接尝试做强制resetlogs操作,数据库报ORA-600 ORA-600 krsi_al_hdr_update.15错误,主要是由于redo写丢失导致无法resetlogs成功,具体参考:Alter Database Open Resetlogs returns error ORA-00600: [krsi_al_hdr_update.15], (Doc ID 2026541.1) Oracle断电故障处理
Wed Aug 19 00:28:47 2026 alter database open resetlogs RESETLOGS is being done without consistancy checks. This may result in a corrupted database. The database should be recreated. RESETLOGS after incomplete recovery UNTIL CHANGE 29721342127 Archived Log entry 38935 added for thread 1 sequence 6916 ID 0xceea62af dest 1: ARCH: All Archive destinations made inactive due to error 742 ARCH: Closing local archive destination LOG_ARCHIVE_DEST_1: '+ARCHDG/2_19951_1224781365.arc' (error 742)(orcl2) Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_287355.trc (incident=727038): ORA-00600: internal error code, arguments: [krsi_al_hdr_update.15], [4294967295], [], [], [], [], [], [], [] Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl2/incident/incdir_727038/orcl2_ora_287355_i727038.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Master archival failure: 600 Archive all online redo logfiles failed:600 ORA-600 signalled during: alter database open resetlogs...
通过 ALTER DATABASE RECOVER database using backup controlfile until cancel之后,继续尝试强制打开库,报ORA-600 2662错误.
Wed Aug 19 00:40:25 2026 Checker run found 32 new persistent data failures alter database open resetlogs RESETLOGS is being done without consistancy checks. This may result in a corrupted database. The database should be recreated. RESETLOGS after incomplete recovery UNTIL CHANGE 29721342127 Archived Log entry 38936 added for thread 1 sequence 6915 ID 0xceea62af dest 1: Archived Log entry 38937 added for thread 1 sequence 6916 ID 0xceea62af dest 1: Archived Log entry 38938 added for thread 2 sequence 19951 ID 0xceea62af dest 1: Archived Log entry 38939 added for thread 2 sequence 19950 ID 0xceea62af dest 1: Clearing online redo logfile 1 +DATADG/orcl/onlinelog/group_1.319.1224781365 Clearing online log 1 of thread 1 sequence number 6915 Wed Aug 19 00:40:34 2026 Clearing online redo logfile 1 complete Clearing online redo logfile 2 +DATADG/orcl/onlinelog/group_2.320.1224781367 Clearing online log 2 of thread 1 sequence number 6916 Clearing online redo logfile 2 complete Clearing online redo logfile 3 +DATADG/orcl/onlinelog/group_3.323.1224781463 Clearing online log 3 of thread 2 sequence number 19951 Clearing online redo logfile 3 complete Clearing online redo logfile 4 +DATADG/orcl/onlinelog/group_4.324.1224781465 Clearing online log 4 of thread 2 sequence number 19950 Clearing online redo logfile 4 complete Resetting resetlogs activation ID 3471467183 (0xceea62af) Online log +DATADG/orcl/onlinelog/group_1.319.1224781365: Thread 1 Group 1 was previously cleared Online log +ARCHDG/orcl/onlinelog/group_1.4574.1224781367: Thread 1 Group 1 was previously cleared Online log +DATADG/orcl/onlinelog/group_2.320.1224781367: Thread 1 Group 2 was previously cleared Online log +ARCHDG/orcl/onlinelog/group_2.10729.1224781369: Thread 1 Group 2 was previously cleared Online log +DATADG/orcl/onlinelog/group_3.323.1224781463: Thread 2 Group 3 was previously cleared Online log +ARCHDG/orcl/onlinelog/group_3.12866.1224781463: Thread 2 Group 3 was previously cleared Online log +DATADG/orcl/onlinelog/group_4.324.1224781465: Thread 2 Group 4 was previously cleared Online log +ARCHDG/orcl/onlinelog/group_4.7527.1224781465: Thread 2 Group 4 was previously cleared Wed Aug 19 00:40:43 2026 Setting recovery target incarnation to 3 Wed Aug 19 00:40:43 2026 Assigning activation ID 3488382552 (0xcfec7e58) Thread 2 opened at log sequence 1 Current log# 3 seq# 1 mem# 0: +DATADG/orcl/onlinelog/group_3.323.1224781463 Current log# 3 seq# 1 mem# 1: +ARCHDG/orcl/onlinelog/group_3.12866.1224781463 Successful open of redo thread 2 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Wed Aug 19 00:40:43 2026 SMON: enabling cache recovery Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_291405.trc (incident=739007): ORA-00600: internal error code, arguments: [2662], [6], [3951555809], [6], [3951556555], [12583040], [], [] Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl2/incident/incdir_739007/orcl2_ora_291405_i739007.trc Wed Aug 19 00:40:45 2026 Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_291405.trc: ORA-00600: internal error code, arguments: [2662], [6], [3951555809], [6], [3951556555], [12583040], [], [] Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_ora_291405.trc: ORA-00600: internal error code, arguments: [2662], [6], [3951555809], [6], [3951556555], [12583040], [], [] Error 600 happened during db open, shutting down database USER (ospid: 291405): terminating the instance due to error 600 Instance terminated by USER, pid = 291405 ORA-1092 signalled during: alter database open resetlogs...
到这一步,现场停止了继续尝试,我接手故障处理.先dbv检测坏块,发现system有两个坏块
[oracle@db3 ~]$ dbv userid=sys/oracle file=/datapool/cold_backup_20260818/SYSTEM.314.1224781265 DBVERIFY: Release 11.2.0.4.0 - Production on Sat Aug 22 10:39:26 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - Verification starting : FILE = /datapool/cold_backup_20260818/SYSTEM.314.1224781265 Page 94587 is marked corrupt Corrupt block relative dba: 0x0041717b (file 1, block 94587) Bad header found during dbv: Data in bad block: type: 11 format: 2 rdba: 0x00400001 last change scn: 0x0000.00000000 seq: 0x1 flg: 0x04 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0x00000b01 check value in block header: 0xd49 computed block checksum: 0x0 Page 95021 is marked corrupt Corrupt block relative dba: 0x0041732d (file 1, block 95021) Bad header found during dbv: Data in bad block: type: 11 format: 2 rdba: 0x00400001 last change scn: 0x0000.00000000 seq: 0x1 flg: 0x04 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0x00000b01 check value in block header: 0xd49 computed block checksum: 0x0 DBVERIFY - Verification complete Total Pages Examined : 157440 Total Pages Processed (Data) : 72079 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 21854 Total Pages Failing (Index): 0 Total Pages Processed (Other): 49484 Total Pages Processed (Seg) : 1 Total Pages Failing (Seg) : 0 Total Pages Empty : 14021 Total Pages Marked Corrupt : 2 Total Pages Influx : 0 Total Pages Encrypted : 0 Highest block SCN : 0 (0.0)
OBET> dbv file 1 =============================================== DBV (Data Block Verification) Block Size: 8192 bytes Endian: little-endian (x86) Target File: #1(only) =============================================== Verifying file #1: /datapool/cold_backup_20260818/SYSTEM.314.1224781265 (157441 blocks) - Started: 2026-08-22 11:14:48 File #32: rfile=1 (0x00000001) header_block_num=157440 (0x00026700) filesize_status:OK Progress: 100000 / 157441 blocks checked... File #1completed: 0 all zero, 0 soft corrupted, 2 tailchk error, 0 checksum error, 0 rdba error DBV completed at: 2026-08-22 11:14:59 =============================================== DBV Summary: Total blocks checked: 157439 Total all zero blocks found: 0 Total all rdba error blocks found: 0 Total all tailchk error blocks found: 2 Total all soft corrupted blocks found: 0 Total all checksum error blocks found: 0 Total bad blocks found: 2 Execution time: 11.00 seconds Throughput: 111.82 MB/s =============================================== Detailed report saved to: dbv_file_32_20260822111448.log Files processed: 1 OBET> list corrupt file 1(/datapool/cold_backup_20260818/SYSTEM.314.1224781265) total bad blocks: 2 block# bad block type 94587 tailchk 95021 tailchk
使用obet修复坏块
Oracle Block Editor Tool使用手册
OBET> set file 32 filename set to: /datapool/cold_backup_20260818/SYSTEM.314.1224781265 (file#1) OBET> set block 94587 block set to: 94587 OBET> set mode edit mode set to: edit OBET> repair block Warning: Missing value for 'block', using global setting: 94587 Repairing block 94587 in file /datapool/cold_backup_20260818/SYSTEM.314.1224781265... Repair analysis for block 94587: 1. seq_kcbh check: 0x01 -> OK 2. Tailchk check: 0x0106C0E4 -> needs repair (0xE4C00601) 3. Checksum check: 0x5EC5 -> needs repair (0x7DE6) Confirm repair operations: File: /datapool/cold_backup_20260818/SYSTEM.314.1224781265 Block: 94587 Operations needed: fix tailchk, fix checksum Confirm? (Y/YES to proceed): y Verification after repair: 1. seq_kcbh: 0x01 OK 2. Tailchk: 0x0106C0E4 OK 3. Checksum: 0x7DE6 OK Block 94587 repair completed successfully. OBET> set block 95021 block set to: 95021 OBET> repair block Warning: Missing value for 'block', using global setting: 95021 Repairing block 95021 in file /datapool/cold_backup_20260818/SYSTEM.314.1224781265... Repair analysis for block 95021: 1. seq_kcbh check: 0x01 -> OK 2. Tailchk check: 0xF8FA0601 -> needs repair (0xE06C0601) 3. Checksum check: 0x81BA -> OK Confirm repair operations: File: /datapool/cold_backup_20260818/SYSTEM.314.1224781265 Block: 95021 Operations needed: fix tailchk Confirm? (Y/YES to proceed): y Verification after repair: 1. seq_kcbh: 0x01 OK 2. Tailchk: 0x01066CE0 OK 3. Checksum: 0x81BA OK Block 95021 repair completed successfully.
dbv检查确认坏块修复成功
[oracle@db3 ~]$ dbv file=/datapool/cold_backup_20260818/SYSTEM.314.1224781265 DBVERIFY: Release 11.2.0.4.0 - Production on Sat Aug 22 11:17:30 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - Verification starting : FILE = /datapool/cold_backup_20260818/SYSTEM.314.1224781265 DBVERIFY - Verification complete Total Pages Examined : 157440 Total Pages Processed (Data) : 72080 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 21855 Total Pages Failing (Index): 0 Total Pages Processed (Other): 49484 Total Pages Processed (Seg) : 1 Total Pages Failing (Seg) : 0 Total Pages Empty : 14021 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Total Pages Encrypted : 0 Highest block SCN : 3951556890 (6.3951556890)
后面的恢复比较简单,使用客户恢复之前的备份,直接重建ctl,然后打开库成功,并且做rman校验没有异常,直接把恢复之后的库备份还原到asm里面,完成本次恢复任务
obet(Oracle Block Editor Tool)第二版发布
在几天之前发布了obet的第一个版本(Oracle数据块编辑工具( Oracle Block Editor Tool)-obet),最近对功能进行了一些完善,并发布第二版
obet工具下载地址:obet下载
obet工具使用说明:obet使用说明
主要增加了以下几个功能:
0) corrupt [block x] 命令主要用于标记坏块功能(在第一版中已经完善)
1) repair [block x] 命令对于坏块的自动修复,主要包括checksum,tailchk,seq_kcbh等
2)增加copy chkscn 命令主要用于对文件头的checkpoint scn相关信息修复
3)增加copy resetlogscn命令主要用于对文件头的resetlogs相关信息修复
4)把之前的copy命令调整为copy data命令格式
5)增加copy block命令主要用于数据文件之间的数据块直接拷贝
该版本的help命令提示
OBET (Oracle Block Editor Tool) commands:
open <config_file> - Load file list from config file (format: <num> <path>)
info - Show loaded file list (from open command)
set filename <path> - Set target file path (required)
set file <num> - Set filename using loaded file number (from open list)
set blocksize <size> - Set block size (2048,4096,[8192],16384,32768)
set block <num> - Set block number (starts from 0, default: 1)
set offset <offset> - Set offset within block (< blocksize, default: 0)
set count <bytes> - Set number of bytes to read (default: 32)
set mode edit/browse - Enable edit/browse mode
d/dump [options] - Display data (options: block X, offset Y, count N)
m/modify <hex> [opts] - Modify data with hex (opts: block X, offset Y)
undo - Undo last modification
sum [block X] - Calculate checksum for block (default: current block)
sum apply [block X] - Apply checksum: write calculated value to block
tailchk [block X] - Calculate tailchk for block (default: current block)
tailchk apply [block X] - Apply tailchk: write calculated value to block
repair [block X] - Repair bad block (fix seq_kcbh, tailchk, checksum)
copy data <src> to <dest> - Copy data between files
<src> format: file,block,offset,count (e.g., 1,1,10,64)
<dest> format: file[,block][,offset] (e.g., 3 or 3,1 or 3,1,128)
copy block file#,block# to file#,block# - Copy entire data block
copy chkscn file n to file m - Copy datafile header checkpoint SCN info
copy resetlogscn file n to file m - Copy datafile header resetlogs info
corrupt [block X] - Mark block as corrupted (default: current block)
show - Display current settings (filename, blocksize, block, offset, count, mode)
license - Show/manage software license (registration code required)
version - Show software version and developer information
p/print <param> - Print Oracle structure,Use the 'p/print' command to see details
undo - Undo the last copy chkscn or copy resetlogscn operation
help - Show this help message
quit/exit - Exit OBET
copy block功能演示
随便把一个block拷贝到文件的另外位置,也可以拷贝到不同文件的其他位置,根据需要调整
OBET> copy block 1,1 to 1,5 Confirm copy block: Source: file#1 (/u01/xifenfei/system01.dbf), block 1 (entire 8192-byte block) Target: file#1 (/u01/xifenfei/system01.dbf), block 5 (entire 8192-byte block) Proceed? (Y/YES to confirm): y Successfully copied block 1 from file#1 to block 5 in file#1 (8192 bytes). OBET> set file 1 filename set to: /u01/xifenfei/system01.dbf (file#1) OBET> set count 128 count set to: 128 OBET> dump block 1 offset 0 File: /u01/xifenfei/system01.dbf Block: 1 Offsets: 0 to 127 -------------------------------------------------------------------------------- 00002000 01230000 01004000 00000000 00000104 28C60000 00000000 0004200B A2DB266A 00002020 58494645 4E464549 AC020000 00720100 00200000 01000300 00000000 00000000 00002040 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00002060 08024000 07000000 00000000 7DC92131 12345678 87654321 00000000 00000000 <128 bytes read> OBET> dump block 5 offset 0 File: /u01/xifenfei/system01.dbf Block: 5 Offsets: 0 to 127 -------------------------------------------------------------------------------- 0000A000 01230000 01004000 00000000 00000104 28C60000 00000000 0004200B A2DB266A 0000A020 58494645 4E464549 AC020000 00720100 00200000 01000300 00000000 00000000 0000A040 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000A060 08024000 07000000 00000000 7DC92131 12345678 87654321 00000000 00000000 <128 bytes read>
copy chkscn功能演示
OBET> p kcvfh.kcvfhckp
File: H:\xifenfei\system01.dbf
Size: 8192 bytes
Block: 1
Offset: 484
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x1BDDBF09
ub2 kscnwrp @488 0x163D
ub2 kscnwrp2 @490 0x0000
ub4 kcvcptim @492 0x488361FC
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0006E3D3
ub4 kcrbabno @504 0x0000B44B
ub2 kcrbabof @508 0x0010
ub1 kcvcpetb[8] @512-519 02 00 00 00 00 00 00 00
OBET> p kcvfh.kcvfhckp
File: H:\xifenfei\sysaux01.dbf
Size: 8192 bytes
Block: 1
Offset: 484
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x67452301
ub2 kscnwrp @488 0x0000
ub2 kscnwrp2 @490 0x0000
ub4 kcvcptim @492 0x00000000
ub2 kcvcpthr @496 0x0000
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0006E3D3
ub4 kcrbabno @504 0x0000B44B
ub2 kcrbabof @508 0x0010
ub1 kcvcpetb[8] @512-519 02 00 00 00 00 00 00 00
<kcvfh.kcvfhckp structure printed successfully>
OBET> copy chkscn file 1 to file 2
Confirm Modify chkscn:
Source: file#1 (H:\xifenfei\system01.dbf)
Target: file#2 (H:\xifenfei\sysaux01.dbf)
Proceed? (Y/YES to confirm): y
Successfully copied checkpoint SCN information from file#1 to file#2.
OBET> p kcvfh.kcvfhckp
File: H:\xifenfei\sysaux01.dbf
Size: 8192 bytes
Block: 1
Offset: 484
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x1BDDBF09
ub2 kscnwrp @488 0x163D
ub2 kscnwrp2 @490 0x0000
ub4 kcvcptim @492 0x488361FC
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0006E3D3
ub4 kcrbabno @504 0x0000B44B
ub2 kcrbabof @508 0x0010
ub1 kcvcpetb[8] @512-519 02 00 00 00 00 00 00 00
<kcvfh.kcvfhckp structure printed successfully>
copy resetlogscn功能演示
OBET> p kcvfh.kcvfhrlc File: H:\xifenfei\system01.dbf Size: 8192 bytes Block: 1 Offset: 112 ub4 kcvfhrlc @112 0x3215EC5C <kcvfh.kcvfhrlc structure printed successfully> OBET> p kcvfh.kcvfhrls File: H:\xifenfei\system01.dbf Size: 8192 bytes Block: 1 Offset: 116 struct kcvfhrls, 8 bytes @116 ub4 kscnbas @116 0x000E74FF ub2 kscnwrp @120 0x0000 ub2 kscnwrp2 @122 0x0000 <kcvfh.kcvfhrls structure printed successfully> OBET> p kcvfh.kcvfhrlc File: H:\xifenfei\sysaux01.dbf Size: 8192 bytes Block: 1 Offset: 112 ub4 kcvfhrlc @112 0x67452301 <kcvfh.kcvfhrlc structure printed successfully> OBET> p kcvfh.kcvfhrls File: H:\xifenfei\sysaux01.dbf Size: 8192 bytes Block: 1 Offset: 116 struct kcvfhrls, 8 bytes @116 ub4 kscnbas @116 0x43658709 ub2 kscnwrp @120 0x0021 ub2 kscnwrp2 @122 0x0000 <kcvfh.kcvfhrls structure printed successfully> OBET> copy resetlogscn file 1 to file 2 Confirm Modify resetlogscn: Source: file#1 (H:\xifenfei\system01.dbf) Target: file#2 (H:\xifenfei\sysaux01.dbf) Proceed? (Y/YES to confirm): y Successfully copied resetlog SCN information from file#1 to file#2. OBET> p kcvfh.kcvfhrlc File: H:\xifenfei\sysaux01.dbf Size: 8192 bytes Block: 1 Offset: 112 ub4 kcvfhrlc @112 0x3215EC5C <kcvfh.kcvfhrlc structure printed successfully> OBET> p kcvfh.kcvfhrls File: H:\xifenfei\sysaux01.dbf Size: 8192 bytes Block: 1 Offset: 116 struct kcvfhrls, 8 bytes @116 ub4 kscnbas @116 0x000E74FF ub2 kscnwrp @120 0x0000 ub2 kscnwrp2 @122 0x0000 <kcvfh.kcvfhrls structure printed successfully>
corrupt [block x]标记坏块功能
C:\Users\XFF>dbv file=h:/xifenfei/users01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期三 11月 12 21:40:55 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\XIFENFEI\USERS01.DBF DBVERIFY - 验证完成 检查的页总数: 26656 处理的页总数 (数据): 23569 失败的页总数 (数据): 0 处理的页总数 (索引): 309 失败的页总数 (索引): 0 处理的页总数 (其他): 720 处理的总页数 (段) : 0 失败的总页数 (段) : 0 空的页总数: 2058 标记为损坏的总页数: 0 流入的页总数: 0 加密的总页数 : 0 最高块 SCN : 2255414715 (18.2255414715) OBET> corrupt block 10 Confirm modification: File: h:/xifenfei/users01.dbf Block: 10 Offset: 14 (file offset: 0x0001400E) Original value: 01 New value: FF Are you sure to set this block corrupted? (Y/YES to proceed): y Verification successful: Block 10 marked as corrupted (offset 14 set to 0xFF). Modification successful. C:\Users\XFF>dbv file=h:/xifenfei/users01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期三 11月 12 21:41:22 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\XIFENFEI\USERS01.DBF 页 10 流入 - 很可能是介质损坏 Corrupt block relative dba: 0x0100000a (file 4, block 10) Fractured block found during dbv: Data in bad block: type: 30 format: 2 rdba: 0x0100000a last change scn: 0x0000.00003e78 seq: 0xff flg: 0x04 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0x3e781e01 check value in block header: 0x1a6 computed block checksum: 0xfe DBVERIFY - 验证完成 检查的页总数: 26656 处理的页总数 (数据): 23569 失败的页总数 (数据): 0 处理的页总数 (索引): 309 失败的页总数 (索引): 0 处理的页总数 (其他): 719 处理的总页数 (段) : 0 失败的总页数 (段) : 0 空的页总数: 2058 标记为损坏的总页数: 1 流入的页总数: 1 加密的总页数 : 0 最高块 SCN : 2255414715 (18.2255414715)
repair [block x]修复坏块功能
C:\Users\XFF>dbv file=h:/xifenfei/undo01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 11月 16 00:06:59 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\XIFENFEI\UNDO01.DBF 页 2 流入 - 很可能是介质损坏 Corrupt block relative dba: 0x02000002 (file 8, block 2) Fractured block found during dbv: Data in bad block: type: 29 format: 2 rdba: 0x02000002 last change scn: 0x163d.1bddbcfa seq: 0xff flg: 0x04 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0xbcfa1d02 check value in block header: 0xec11 computed block checksum: 0xfd DBVERIFY - 验证完成 检查的页总数: 4880 处理的页总数 (数据): 0 失败的页总数 (数据): 0 处理的页总数 (索引): 0 失败的页总数 (索引): 0 处理的页总数 (其他): 4372 处理的总页数 (段) : 11 失败的总页数 (段) : 0 空的页总数: 507 标记为损坏的总页数: 1 流入的页总数: 1 加密的总页数 : 0 最高块 SCN : 467517187 (5693.467517187) OBET> repair Repairing block 2 in file H:\xifenfei\undo01.dbf... Repair analysis for block 2: 1. seq_kcbh check: 0xFF -> needs repair (0x01) 2. Tailchk check: 0x021DFABC -> needs repair (0x011DFABC) 3. Checksum check: 0x11EC -> OK Confirm repair operations: File: H:\xifenfei\undo01.dbf Block: 2 Operations needed: fix offset14, fix tailchk Confirm? (Y/YES to proceed): y Verification after repair: 1. seq_kcbh: 0x01 OK 2. Tailchk: 0x011DFABC OK 3. Checksum: 0x11EC OK Block 2 repair completed successfully. C:\Users\XFF>dbv file=h:/xifenfei/undo01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 11月 16 00:07:29 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\XIFENFEI\UNDO01.DBF DBVERIFY - 验证完成 检查的页总数: 4880 处理的页总数 (数据): 0 失败的页总数 (数据): 0 处理的页总数 (索引): 0 失败的页总数 (索引): 0 处理的页总数 (其他): 4373 处理的总页数 (段) : 11 失败的总页数 (段) : 0 空的页总数: 507 标记为损坏的总页数: 0 流入的页总数: 0 加密的总页数 : 0 最高块 SCN : 467517187 (5693.467517187)


加我微信(17813235971)
加我QQ(107644445)

