最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
oracle中bbed恢复与找回删除数据
时间:2022-06-29 10:00:56 编辑:袖梨 来源:一聚教程网
恢复己删除数据
一、创建模拟环境
代码如下 | 复制代码 |
SQL> create table hr.xifenfei (id number,name varchar2(20)) tablespace xff; Table created. SQL> insert into hr.xifenfei values(1,’xifenfei’); 1 row created. SQL> insert into hr.xifenfei values(2,’xff’); 1 row created. SQL> commit; Commit complete. SQL> select * from hr.xifenfei; ID NAME SQL> select rowid, ROWID REL_FNO BLOCKNO ROWNO SQL> delete from hr.xifenfei where id=2; 1 row deleted. SQL> commit; Commit complete. SQL> select * from hr.xifenfei; ID NAME SQL> shutdown immediate; |
二、bbed恢复删除数据
代码如下 | 复制代码 |
[oracle@localhost ~]$ bbed parfile=/tmp/parfile.cnf BBED: Release 2.0.0.0.0 – Limited Production on Mon Aug 22 01:52:52 2011 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> show all BBED> set dba 2,530 BBED> find /c xff <32 bytes per line> BBED> dump /v <16 bytes per line> BBED> dump /v offset 8160 <16 bytes per line> BBED> dump /v offset 8164 <16 bytes per line> BBED> dump /v offset 8162 <16 bytes per line> BBED> dump /v offset 8163 <16 bytes per line> BBED> modify /x 2c <32 bytes per line> BBED> sum apply |
三、核对结果
代码如下 | 复制代码 |
SQL> startup Total System Global Area 236000356 bytes ID NAME 说明: |
找回被删除数据
创建模拟表数据
代码如下 | 复制代码 |
SQL> create table t_xifenfei(id number,name varchar2(10)); dump数据块 dump文件内容 |
删除表数据
代码如下 | 复制代码 |
SQL> delete from t_xifenfei; dump文件内容 通过对比这两次的dump文件发现 |
关闭数据库
代码如下 | 复制代码 |
SQL> select * from chf.t_xifenfei; bbed修改数据 |
启动数据库验证
代码如下 | 复制代码 |
SQL> startup ORACLE instance started. Total System Global Area 535662592 bytes Fixed Size 1346140 bytes Variable Size 411043236 bytes Database Buffers 117440512 bytes Redo Buffers 5832704 bytes Database mounted. Database opened. SQL> select * from chf.t_xifenfei; ID NAME ---------- ---------- 1 xifenfei 2 XIFENFEI |
相关文章
- 《使命召唤:黑色行动6》战役双倍下注任务攻略 11-05
- 《使命召唤:黑色行动6》战役敏锐的眼睛任务攻略 11-05
- 《使命召唤:黑色行动6》战役请勿吸烟任务攻略 11-05
- 《怪物猎人:荒野》游戏气候介绍 11-05
- 《怪物猎人:荒野》丰饶期气候介绍 11-05
- 《龙腾世纪:影障守护者》游侠不同职业区别介绍 11-05