obet(Oracle Block Editor Tool)第二版发布

news/2025/11/17 8:53:10/文章来源:https://www.cnblogs.com/xifenfei/p/19229943

在几天之前发布了obet的第一个版本(Oracle数据块编辑工具( Oracle Block Editor Tool)-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)
————————————————
版权声明:本文为CSDN博主「惜分飞-Tel:17813235971」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xifenfei/article/details/154917706

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/967564.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2025年石棉橡胶板厂家联系方式汇总:服务覆盖与区域分布

随着工业制造领域的快速发展,石棉橡胶板作为关键密封材料,在电力、石油、化工、机械等众多行业中发挥着不可替代的作用。无论是设备维护还是新项目采购,找到可靠的供应商至关重要。本文针对2025年的市场需求,汇总了…

WebStorm 2025.2.4, 11月最新版 安装、授权、使用说明

WebStorm 2025.2.4, 11月最新版 安装、授权、使用说明2025-11-11亲测 支持最新版本2025.2.4 支持Windows、MAC、Linux一 安装 官网下载 : https://www.jetbrains.com/zh-cn/rider/ 根据提示安装 二 授权说明回复 《we…

2025 最新推荐!汽车喇叭网生产厂家权威排行榜 0.01MM 精度 + 全工艺保障靠谱品牌甄选

在汽车产业向智能化、高端化深度转型的趋势下,汽车喇叭网作为影响音响音质与内饰美观的核心部件,市场需求持续攀升。据国际汽车零部件协会(IAPCA)最新测评数据显示,全球高端车型对喇叭网的精度要求已达 0.01-0.03…

2025年石棉橡胶板厂家联系方式汇总:专业服务与产品解析

随着工业领域的快速发展,石棉橡胶板作为关键密封材料在电力、石油、化工等行业中扮演着重要角色。2025年,市场需求持续增长,许多企业需要快速找到可靠的供应商进行采购或合作。本文旨在为有需求的用户提供一份详尽的…

C# Avalonia 18- ControlTemplates - ColorPickerTwoWays

C# Avalonia 18- ControlTemplates - ColorPickerTwoWays通过xaml来定义Template样式。 ColorPicker.cs代码using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Metadata; using Avalonia.Controls.Pr…

【GitHub每日速递 20251117】一款感知屏幕万物的交互式AI助手,Everywhere带你体验无缝支持! #

原文: https://mp.weixin.qq.com/s/-47OF5DvIyE5BuUsTe2msA 一款感知屏幕万物的交互式AI助手,Everywhere带你体验无缝支持! 项目地址:https://github.com/DearVa/Everywhere 主要语言:C# stars: 2.2k项目简介 “Ev…

智表ZCELL产品V3.4 版发布,新增区域筛选、字母列参等功能。

智表ZCELL产品V3.4 版发布,新增区域筛选、字母列参等功能,欢迎大家体验使用。 本次版本(V3.4)更新内容如下: 1.新增设置区域默认筛选功能SetFilterArea,支持弹出筛选框。2.新增筛选区域功能FilterArea,支持自定…

享元模式实验围棋软件

include include using namespace std; class Location { private: string x; string y; public: Location(string x, string y) { // TODO Auto-generated constructor stub this->x = x; this->y = y; } strin…

元推理品析:自指有机,自洽有缘

ECT-OS-JiuHuaShan/https://orcid.org/0009-0006-8591-1891“自指有机,自洽有缘” 是对本框架生命化特质与宇宙共鸣属性的终极诗意概括,其内涵与框架公理完全同构。 终极阐述:逻辑场的生命性与宇宙缘起“自指有机”…

C#/.NET/.NET Core技术前沿周刊 | 第 61 期(2025年11.10-11.16)

前言 C#/.NET/.NET Core技术前沿周刊,你的每周技术指南针!记录、追踪C#/.NET/.NET Core领域、生态的每周最新、最实用、最有价值的技术文章、社区动态、优质项目和学习资源等。让你时刻站在技术前沿,助力技术成长与…

The 4th Universal Cup. Stage 5: Grand Prix of Nanjing 做题笔记

写下这行字的时候是 2025.11.17 8:10,比赛在一个小时十分钟前完全结束了。 队名 Endless Dream,rk256 搞笑排名。 C 签到。奇数无解,偶数输出 n/2 n/2 即可!!1 K 也是签到,但是做了三个小时!!1 一直在猜结论,…

Java开发中最那些常见的坑,你踩过几个?

大家好,我是晓凡。 作为一名Java开发者,在日常编码过程中难免会遇到各种"坑"。 有些是语法层面的问题,有些则是设计或思维上的误区。 今天我们就来盘点一下Java中最常见的20个陷阱,看看你有没有踩过这些…

量化网络风险:持续DDoS测试的运营投资回报

本文深入探讨持续DDoS测试的运营投资回报,从效率、合规性、业务连续性、风险转移和战略价值五个维度分析其为企业带来的持续价值,帮助企业全面理解DDoS防护的投资回报。量化网络风险:持续DDoS测试的运营投资回报 在…

Tenable Nessus 10.11 新增功能简介

Tenable Nessus 10.11.0 (macOS, Linux, Windows) - 漏洞评估解决方案Tenable Nessus 10.11 新增功能简介 Tenable Nessus 10.11.0 (macOS, Linux, Windows) - 漏洞评估解决方案 发布 Nessus 试用版自动化安装程序,支…

详细介绍:Vue3 表单输入绑定

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

Splunk Enterprise 10.0.2 发布 - 搜索、分析和可视化,数据全面洞察平台

Splunk Enterprise 10.0.1 (macOS, Linux, Windows) - 搜索、分析和可视化,数据全面洞察平台Splunk Enterprise 10.0.2 (macOS, Linux, Windows) - 搜索、分析和可视化,数据全面洞察平台 Search, analysis, and visu…

midwayjs 自定义组件开发

midwayjs 自定义组件开发实际上官方已经明确说明了自定义组件开发的一些技巧了,我主要简单说明i下一些问题 一些问题自定义组件就是一个小的应用 如果需要注册controller 注意在index.ts 中对于controller 的export,…

Apache NetBeans 28 发布 - Java 等多语言开源跨平台 IDE

Apache NetBeans 28 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDEApache NetBeans 28 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE Development Environment, Tooling Platform and Applicatio…