湖北佛 发表于 2013-9-9 08:38:14

BBED find copy命令

sys@OMREP> create table srain(job varchar2(100));

Table created.

sys@OMREP> insert into srain values('Srain is dba!');

1 row created.

sys@OMREP> insert into srain values('Srain like oracle!');

1 row created.

sys@OMREP> commit;

Commit complete.

sys@OMREP> select
2rowid,
3dbms_rowid.rowid_relative_fno(rowid) rel_fno,
4dbms_rowid.rowid_block_number(rowid) blockno,
5dbms_rowid.rowid_row_number(rowid) rowno
6fromsrain;

ROWID               REL_FNO    BLOCKNO      ROWNO
------------------ ---------- ---------- ----------
AAADcEAABAAAIF5AAA          1      33145          0
AAADcEAABAAAIF5AAB          1      33145          1

BBED> set dba 1,33145
      DBA             0x00408179 (4227449 1,33145)

BBED> set offset 0
      OFFSET          0

BBED> find /c Srain top
BBED-00212: search string not found
**********************************************************************************************
BBED> exit

$ bbed parfile=/u01/bbed.par
Password:

BBED> set dba 1,33145
      DBA             0x00408179 (4227449 1,33145)

BBED> set offset 0
      OFFSET          0

BBED> find /c Srain top
File: /u01/app/oracle/oradata/omrep/system01.dbf (1)
Block: 33145            Offsets: 8153 to 8191         Dba:0x00408179
------------------------------------------------------------------------
53726169 6e206c69 6b65206f 7261636c 65212c01 010d5372 61696e20 69732064
62612106 06148d

<32 bytes per line>

BBED> d /v offset 8153 count 128
File: /u01/app/oracle/oradata/omrep/system01.dbf (1)
Block: 33145   Offsets: 8153 to 8191Dba:0x00408179
-------------------------------------------------------
53726169 6e206c69 6b65206f 7261636c l Srain like oracl
65212c01 010d5372 61696e20 69732064 l e!,...Srain is d
62612106 06148d                     l ba!....

<16 bytes per line>

如果我们要继续搜索Dave,那么只需要按下f 就可以了,不需要跟参数。
BBED> f
File: /u01/app/oracle/oradata/omrep/system01.dbf (1)
Block: 33145            Offsets: 8175 to 8191         Dba:0x00408179
------------------------------------------------------------------------
53726169 6e206973 20646261 21060614 8d

<32 bytes per line>

BBED> d /v offset 8175 count 128
File: /u01/app/oracle/oradata/omrep/system01.dbf (1)
Block: 33145   Offsets: 8175 to 8191Dba:0x00408179
-------------------------------------------------------
53726169 6e206973 20646261 21060614 l Srain is dba!...
8d                                  l .

<16 bytes per line>


find 命令支持的switch 类型如上表,注意,find 不支持number和Date 。
find命令可以用来搜索关键字。 可以从offset 0 搜索到top 或者从当前的offset 搜索到top。

BBED> copy dba 1,115362 to dba 1,115363
copy 是个危险的命令,慎用。

页: [1]
查看完整版本: BBED find copy命令