oracle

推荐列表 站点导航

当前位置:首页 > 数据库 > oracle >

oracle bbed恢复删除数据实例

来源:网络整理  作者:网络  发布时间:2020-12-09 12:00
在oracle中bbed恢复删除数据实例...
Variable Size 201326592 bytes
Commit complete.
Block: 530 Offsets: 8170 to 8191 Dba:0×00800212
OFFSET 0
1 xifenfei
Block: 530 Offsets: 8160 to 8191 Dba:0×00800212
查询file#,block,后面恢复要用
LOGFILE log.bbd

************* !!! For Oracle Internal Use only !!! ***************
SQL> create table hr.xifenfei (id number,name varchar2(20)) tablespace xff;
SQL> insert into t_xifenfei values(2,'XIFENFEI');
Commit complete.

复制代码 代码如下:

<16 bytes per line>
Table created.
Database opened.
3c020202 c1030378 66662c00 0202c102 l <......xff,.....
BLOCK# 1
Password:

复制代码 代码如下:

2012-05-01 05:09:29.287714 : kjbmbassert [0xaf.4]
——————————————————-
1 row deleted.
SQL> insert into hr.xifenfei values(2,'xff');

复制代码 代码如下:

Block: 530 Offsets: 8163 to 8191 Dba:0×00800212
1 row created.

ROWID REL_FNO BLOCKNO ROWNO
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
Fixed Size 451684 bytes
SQL> commit;
  2  dbms_rowid.rowid_relative_fno(rowid)rel_fno,
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
AAASdmAAEAAAACvAAB          2 XIFENFEI            4        175          1
修改3c为2c
BBED> show all
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
SQL> startup
Database dismounted.
EDIT Unrecoverable
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
DBA 0×00800001 (8388609 2,1)
<32 bytes per line>
ORACLE instance started.


———- ——————–
SQL> delete from hr.xifenfei where id=2;
col  1: [ 8]  78 69 66 65 6e 66 65 69
—————— ———- ———- ———-
AAAHy3AACAAAAISAAA 2 530 0
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)

Block: 530 Offsets: 8162 to 8191 Dba:0×00800212
找回被删除数据
SQL> insert into hr.xifenfei values(1,'xifenfei');
IBASE Dec
003c0202 02c10303 7866662c 000202c1 l .<......xff,....

AAAHy3AACAAAAISAAB 2 530 1
BLOCKSIZE 8192

BBED> sum apply

  4  dbms_rowid.rowid_row_number(rowid) rowno
AAASdmAAEAAAACvAAA          1 xifenfei            4        175          0
ID NAME

 

current = 0xb1b9, required = 0xb1b9

恢复己删除数据
020202c1 03037866 662c0002 02c10208 l ……xff,……
Table created.


Database closed.
65690106 80e2 l ei….
BBED> set dba 2,530
1 row created.
通过尝试,推断出来3c的offset
BBED> find /c xff
SQL> select * from hr.xifenfei;
end_of_block_dump
[oracle@localhost ~]$ bbed parfile=/tmp/parfile.cnf
SQL> select * from hr.xifenfei;
78696665 6e666569 010680e2 l xifenfei….
——————————————————-
BBED> dump /v offset 8160
Block: 530 Offsets: 8170 to 8191 Dba:0×00800212
说明:
FILE# 2
LISTFILE /tmp/list
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
col  0: [ 2]  c1 03
2)如果数据被删除:row flag的值为 32+16+8+4=60或者0x3c
2c020202 c1030378 66662c00 0202c102 08786966 656e6665 69010680 e2
dump数据块
Total System Global Area 236000356 bytes
5 from hr.xifenfei;
——————————————————-

BBED> dump /v offset 8163


 

一、创建模拟环境
——————————————————-
1 xifenfei
1 xifenfei
2 dbms_rowid.rowid_relative_fno(rowid)rel_fno,
<32 bytes per line>
SQL> select   rowid,id,name,
1 row created.
SQL> insert into t_xifenfei values(1,'xifenfei');

复制代码 代码如下:


End dump data blocks tsn: 4 file#: 4 minblk 175 maxblk 175
SQL> shutdown immediate;

BBED> dump /v offset 8162
tab 0, row 0, @0x1f89
tab 0, row 1, @0x1f7a

block_row_dump:
————————————————————————
删除表数据
<16 bytes per line>
SQL> select rowid,
  5  from chf.t_xifenfei;
dump文件内容
0000003c 020202c1 03037866 662c0002 l …<......xff,..

SQL> commit;
ID NAME
SQL> alter system flush BUFFER_CACHE;
tl: 15 fb: --H-FL-- lb: 0x1  cc: 2
<16 bytes per line>
SQL> create table t_xifenfei(id number,name varchar2(10));
ROWID                      ID NAME          REL_FNO    BLOCKNO      ROWNO
02c10208 78696665 6e666569 010680e2 l ....xifenfei....
Commit complete.
Database mounted.
tl: 15 fb: --H-FL-- lb: 0x1  cc: 2
08786966 656e6665 69010680 e2 l .xifenfei....
——————————————————-
SQL> alter system dump datafile 4 block 175;
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
7866662c 000202c1 02087869 66656e66 65690106 80e2
创建模拟表数据
4 dbms_rowid.rowid_row_number(rowid) rowno

复制代码 代码如下:



<16 bytes per line>
Check value for File 2, Block 530:
DBA 0×00800212 (8389138 2,530)
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
7866662c 000202c1 02087869 66656e66 l xff,……xifenf
<16 bytes per line>
BBED> dump /v offset 8164
1)如果数据未删除:row flag的值为 32+8+4=44或者0x2c
WIDTH 80
SPOOL No
Block: 530 Offsets: 8163 to 8191 Dba:0×00800212
———- ——————–
3 dbms_rowid.rowid_block_number(rowid)blockno,

Block: 530 Offsets: 8164 to 8191 Dba:0×00800212
1 row created.
COUNT 512
OBASE Dec
System altered.
------------------ ---------- ---------- ---------- ---------- ----------
2 xff
2 xff
BBED> modify /x 2c
三、核对结果
System altered.
———- ——————–
BBED: Release 2.0.0.0.0 – Limited Production on Mon Aug 22 01:52:52 2011
二、bbed恢复删除数据
02087869 66656e66 65690106 80e2 l ..xifenfei....
  3  dbms_rowid.rowid_block_number(rowid)blockno,
BBED> dump /v

SQL> select * from hr.xifenfei;
ID NAME
col  0: [ 2]  c1 02
 

BIFILE bifile.bbd
SQL> commit;
ORACLE instance shut down.
————————————————————————
FILENAME /opt/oracle/oradata/xifenfei/xff01.dbf
col  1: [ 8]  58 49 46 45 4e 46 45 49
MODE Edit

相关热词: oracle 实例

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://www.juheyunku.com/sql/oracle/1800.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

oracle bbed恢复删除数据实例

2020-12-09 编辑:网络

Variable Size 201326592 bytes
Commit complete.
Block: 530 Offsets: 8170 to 8191 Dba:0×00800212
OFFSET 0
1 xifenfei
Block: 530 Offsets: 8160 to 8191 Dba:0×00800212
查询file#,block,后面恢复要用
LOGFILE log.bbd

************* !!! For Oracle Internal Use only !!! ***************
SQL> create table hr.xifenfei (id number,name varchar2(20)) tablespace xff;
SQL> insert into t_xifenfei values(2,'XIFENFEI');
Commit complete.

复制代码 代码如下:

<16 bytes per line>
Table created.
Database opened.
3c020202 c1030378 66662c00 0202c102 l <......xff,.....
BLOCK# 1
Password:

复制代码 代码如下:

2012-05-01 05:09:29.287714 : kjbmbassert [0xaf.4]
——————————————————-
1 row deleted.
SQL> insert into hr.xifenfei values(2,'xff');

复制代码 代码如下:

Block: 530 Offsets: 8163 to 8191 Dba:0×00800212
1 row created.

ROWID REL_FNO BLOCKNO ROWNO
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
Fixed Size 451684 bytes
SQL> commit;
  2  dbms_rowid.rowid_relative_fno(rowid)rel_fno,
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
AAASdmAAEAAAACvAAB          2 XIFENFEI            4        175          1
修改3c为2c
BBED> show all
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
SQL> startup
Database dismounted.
EDIT Unrecoverable
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
DBA 0×00800001 (8388609 2,1)
<32 bytes per line>
ORACLE instance started.


———- ——————–
SQL> delete from hr.xifenfei where id=2;
col  1: [ 8]  78 69 66 65 6e 66 65 69
—————— ———- ———- ———-
AAAHy3AACAAAAISAAA 2 530 0
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)

Block: 530 Offsets: 8162 to 8191 Dba:0×00800212
找回被删除数据
SQL> insert into hr.xifenfei values(1,'xifenfei');
IBASE Dec
003c0202 02c10303 7866662c 000202c1 l .<......xff,....

AAAHy3AACAAAAISAAB 2 530 1
BLOCKSIZE 8192

BBED> sum apply

  4  dbms_rowid.rowid_row_number(rowid) rowno
AAASdmAAEAAAACvAAA          1 xifenfei            4        175          0
ID NAME

 

current = 0xb1b9, required = 0xb1b9

恢复己删除数据
020202c1 03037866 662c0002 02c10208 l ……xff,……
Table created.


Database closed.
65690106 80e2 l ei….
BBED> set dba 2,530
1 row created.
通过尝试,推断出来3c的offset
BBED> find /c xff
SQL> select * from hr.xifenfei;
end_of_block_dump
[oracle@localhost ~]$ bbed parfile=/tmp/parfile.cnf
SQL> select * from hr.xifenfei;
78696665 6e666569 010680e2 l xifenfei….
——————————————————-
BBED> dump /v offset 8160
Block: 530 Offsets: 8170 to 8191 Dba:0×00800212
说明:
FILE# 2
LISTFILE /tmp/list
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
col  0: [ 2]  c1 03
2)如果数据被删除:row flag的值为 32+16+8+4=60或者0x3c
2c020202 c1030378 66662c00 0202c102 08786966 656e6665 69010680 e2
dump数据块
Total System Global Area 236000356 bytes
5 from hr.xifenfei;
——————————————————-

BBED> dump /v offset 8163


 

一、创建模拟环境
——————————————————-
1 xifenfei
1 xifenfei
2 dbms_rowid.rowid_relative_fno(rowid)rel_fno,
<32 bytes per line>
SQL> select   rowid,id,name,
1 row created.
SQL> insert into t_xifenfei values(1,'xifenfei');

复制代码 代码如下:


End dump data blocks tsn: 4 file#: 4 minblk 175 maxblk 175
SQL> shutdown immediate;

BBED> dump /v offset 8162
tab 0, row 0, @0x1f89
tab 0, row 1, @0x1f7a

block_row_dump:
————————————————————————
删除表数据
<16 bytes per line>
SQL> select rowid,
  5  from chf.t_xifenfei;
dump文件内容
0000003c 020202c1 03037866 662c0002 l …<......xff,..

SQL> commit;
ID NAME
SQL> alter system flush BUFFER_CACHE;
tl: 15 fb: --H-FL-- lb: 0x1  cc: 2
<16 bytes per line>
SQL> create table t_xifenfei(id number,name varchar2(10));
ROWID                      ID NAME          REL_FNO    BLOCKNO      ROWNO
02c10208 78696665 6e666569 010680e2 l ....xifenfei....
Commit complete.
Database mounted.
tl: 15 fb: --H-FL-- lb: 0x1  cc: 2
08786966 656e6665 69010680 e2 l .xifenfei....
——————————————————-
SQL> alter system dump datafile 4 block 175;
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
7866662c 000202c1 02087869 66656e66 65690106 80e2
创建模拟表数据
4 dbms_rowid.rowid_row_number(rowid) rowno

复制代码 代码如下:



<16 bytes per line>
Check value for File 2, Block 530:
DBA 0×00800212 (8389138 2,530)
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
File: /opt/oracle/oradata/xifenfei/xff01.dbf (2)
7866662c 000202c1 02087869 66656e66 l xff,……xifenf
<16 bytes per line>
BBED> dump /v offset 8164
1)如果数据未删除:row flag的值为 32+8+4=44或者0x2c
WIDTH 80
SPOOL No
Block: 530 Offsets: 8163 to 8191 Dba:0×00800212
———- ——————–
3 dbms_rowid.rowid_block_number(rowid)blockno,

Block: 530 Offsets: 8164 to 8191 Dba:0×00800212
1 row created.
COUNT 512
OBASE Dec
System altered.
------------------ ---------- ---------- ---------- ---------- ----------
2 xff
2 xff
BBED> modify /x 2c
三、核对结果
System altered.
———- ——————–
BBED: Release 2.0.0.0.0 – Limited Production on Mon Aug 22 01:52:52 2011
二、bbed恢复删除数据
02087869 66656e66 65690106 80e2 l ..xifenfei....
  3  dbms_rowid.rowid_block_number(rowid)blockno,
BBED> dump /v

SQL> select * from hr.xifenfei;
ID NAME
col  0: [ 2]  c1 02
 

BIFILE bifile.bbd
SQL> commit;
ORACLE instance shut down.
————————————————————————
FILENAME /opt/oracle/oradata/xifenfei/xff01.dbf
col  1: [ 8]  58 49 46 45 4e 46 45 49
MODE Edit

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://www.juheyunku.com/sql/oracle/1800.shtml

相关文章

风云图片

推荐阅读

返回oracle频道首页