Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: is it the bbed?
Well, surprisingly, I got this info from this list.
Looks like you missed this previous post, Mladen.
Read on.
"biti_rainy" <biti_rainy_at_itpub.net>
Sent by: oracle-l-bounce_at_freelists.org
04/19/2004 05:52 PM
Please respond to oracle-l
To: oracle-l_at_freelists.org <oracle-l_at_freelists.org> cc: Subject: is it the bbed?
hi,Srinivasan Vasan
Best regards
yahoo id: feng_chunpei
msn: biti_rainy_at_hotmail.com
=3D=3D=3D=3D=3D=3D from the mail=3D=3D=3D=3D=3D=3D=3D=3D=3D
>There is a block edit utility that can be used to edit the=
contents of
>blocks. To be used with care. We have used it once (to set=
everything in the
>block to zero) when we knew for sure that the contents of the=
block were no
>longer accessed.
is it the BBED?
Article-ID: <Note:62015.1> Alias: SUPTOOL:BBED Circulation: PUBLISHED (INTERNAL) ***Oracle Confidential -= Internal Use Only*** Folder: server.Internals.General Topic: ** Support Tools Title: SUPTOOL: BBED - 7.3.2+ Database Block= Editor Document-Type: REFERENCE Impact: MEDIUM Skill-Level: NOVICE Server-Version: 07.03 to 08.01 Updated-Date: 24-MAR-2000 16:26:29References:
Authors: DEV Attachments: NONE Content-Type: TEXT/PLAIN Products: 5/RDBMS (7.3 to 8.1); Platforms: GENERIC;
BBED is shipped with Oracle8 releases, and with some Oracle7.3=
releases.
BBED is a SUPPORT ONLY tool and should NOT be discussed with=
customers.
On UNIX the tool needs to be built using a command of the= form:
=09cd $ORACLE_HOME/rdbms/lib
=09make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
OR to build in the bn directory:
make -f ins_rdbms.mk BBED=3D$ORACLE_HOME/bin/bbed= $ORACLE_HOME/bin/bbed
On Windows NT a BBED.EXE is shipped as an executable and so is=
password
protected. This password protection is present on Unix from=
8.1.6 onwards.
@ The password in Oracle8 and Oracle8i is "blockedit"
Using BBED:
REVERT
use specified (or default) BIFILE to revert changes made in a=
previous
user session. MODE must be EDIT, all files that were modified=
in that
session must be writable.
LOGFILE:
appended to an existing file.
LISTFILE format:
<file#> <filename> <file size in bytes (optional)>
e.g. 1 /home/vsrihari/corahome/dbs/systV713.dbf 26214400
2 /home/vsrihari/corahome/dbs/rbsV713.dbf 15728640
CMDFILE format:
one command per line (newline is command separator).
use "#" to put in comments, that are ignored by BBED.
if QUIT/EXIT command is encountered BBED exits, otherwise it
goes into interactive mode after executing the file.
B. Implemented commands:
SET [IBASE | OBASE | DBA | OFFSET | FILE | FILENAME |= BLOCK | MODE |
=09 EDIT | WIDTH | BLOCKSIZE | LIST[FILE] | COUNT | SPOOL ] SHOW [any of the above SET parameters | STACK | ALL] MAP [/v] [DBA | FILE | FILENAME | BLOCK] COPY [DBA | FILE | FILENAME | BLOCK] TO [DBA | FILE |= FILENAME | BLOCK] *DUMP [/v] [DBA | FILE | FILENAME | BLOCK | OFFSET |= COUNT] *MODIFY [/x|d|u|o|c] <numeric/char string> =09=09=09[DBA | FILE | FILENAME | BLOCK | OFFSET | <off spec>] *ASSIGN [/x|d|u|o] [DBA | FILE | FILENAME | BLOCK | OFFSET |=<off spec>]
*FIND [/x|d|u|o|c] <numeric/char string> [TOP | CURR] *PRINT [/f codes] [DBA | FILE | FILENAME | BLOCK | OFFSET |=<off spec>]
PUSH [DBA | FILE | FILENAME | BLOCK | OFFSET] POP [ALL] INFO [FILES] UNDO REVERT [DBA | FILE | FILENAME | BLOCK | ALL] *VERIFY [DBA | FILE | FILENAME | BLOCK ]HELP
o SET BLOCK or DBA with no arguments just rereads the current= block.
o SHOW STACK displays the locations (dba, offset) that were= PUSHed.
o IBASE/OBASE are set to decimal by default. Use base switches=
[/xduoc] or
explicit bases to override. Explicit bases have the highest=
precedence:
Hexadecimal (prefix) =3D 0x e.g. 0x1234abcdef Octal (prefix) =3D 0o e.g. 0o1234567 Decimal (suffix) =3D . e.g. 1234567890.
o DUMP/EXAMINE are physical browsing commands, PRINT is logical= browsing.
o MODIFY is for physical editing (a la Orapatch). MODE must be=
set to EDIT to
allow editing. All edits are written immediately to disk (no=
buffering).
o FIND searches only the current block. Use TOP to start search=
at top of
block, CURR (default) from current offset. Typing just FIND (or=
F) continues
looking for the same string.
o ASSIGN <target> =3D <source> does symbolic assignment, with type=
and range
checking. Either <target> or <source> can be omitted, for the=
current offset.
e.g. ASSIGN =3Ddba 4, 2 ktbbhitl[0]
o COPY <source block> TO <target block> does a physical block=
copy.
Either target or source can be omitted, if the current block is=
intended.
e.g. COPY TO BLOCK 10 -- copies current block onto block 10
o UNDO rolls back the last modify/assign command issued. The undo=
itself can
be undone by another UNDO command.
o REVERT rolls back all changes made in the current session, then=
clears the
current BIFILE.
o VERIFY runs dbverify on a block or a file. e.g. VERIFY FILE; -- verifies the current file
o PRINT/EXAMINE switches (/):
/Nuf - where:
=09N - a number which specifies a repeat COUNT. =09u - a letter which specifies a UNIT SIZE: =09 b - b1, ub1 (byte) =09 h - b2, ub2 (half-word) =09 w - b4, ub4 (word) =09 l - b4, ub4 (long), will become b8/ub8 in Oracle8. =09 r - Oracle table/index row =09f - a letter which specifies a DISPLAY format: =09 x - hex =09 d - signed decimal =09 u - unsigned decimal =09 o - octal =09 c - character =09 n - Oracle Number =09 t - Oracle Date =09 i - Oracle Rowid e.g. /10bx - means 10 bytes in hex format. /rx - means 1 row with all columns in hex format. /r2cn - means 1 row, first 2 cols in char, remaining cols=in Oracle
Note: PRINT uses only [/f] since it deals with logical units.
EXAMINE uses [/Nuf].
o OFFSET SPECIFIER:
BBED is flexible in how you specify the offset at which you=
want to operate:
=09Numeric - a direct byte offset e.g. 59 =09Symbolic - name of a symbol e.g. kdbr[3] =09Indirect - value stored at this location e.g. *59 or *kdbr[3]]
e.g. SET OFFSET *kdbr[18] -- takes you to the start of the 19th= row.
SET OFFSET kdbr[18] -- takes you to the 19th row= directory entry.
o PUSH/POP allow traversal of list structures e.g. block free= list.
C. Getting started:
(1) Create a listfile containing all files in the database: e.g. files.lst:
=091 /home/vsrihari/corahome/dbs/systV713.dbf 26214400 =092 /home/vsrihari/corahome/dbs/rbsV713.dbf 15728640 =093 /home/vsrihari/corahome/dbs/tempV713.dbf 10485760 =094 /home/vsrihari/corahome/dbs/usrV713.dbf 20971520 =096 /home/vsrihari/corahome/dbs/users_2V713.dbf 5242880 =097 /home/vsrihari/corahome/dbs/vhsV713.dbf 102400
(2) Create a parfile with starting options: e.g. par.bbd:
=09blocksize=3D4096 =09listfile=3D/private3/vsrihari/vs73/utl/bbed/files.lst =09mode=3Dedit =09(filename or file to open, default is file 1)
(3) Invoke BBED:
=09bbed parfile=3Dpar.bbd
D. Test Runs:
Currently only data blocks (table and index) are supported. (1) View block data structures:
=09set dba 4, 1000=09=09-- file, block of data block to view =09map=09=09=09-- gives you high level view of block =09map /v=09=09=09-- more detailed view =09p ktbbh=09=09=09-- look at ktbbh contents =09p ktbbh.ktbbhitl[1]=09-- look at the second itl (if one exists) =09p *kdbr[0]=09=09-- look at the start of row 1 =09p *kdbh.kdbhfseo=09-- end of freespace i.e. start of rowdata =09p /*=09=09=09-- prints entire block =09p kdxle=09=09=09-- prints index leaf data header =09set dba *kdxlenxt=09-- switch to next leaf block
(2) View index (leaf/branch), data (table/cluster) rows:
BBED>x /rni *kdxle_off[20]=09-- view a leaf row, with number, rowid= cols
rowdata[2769] @3775 ------------- flag_at_3775: 0x00 () lock_at_3776: 0x00
BBED> push dba 0x100002cb off *kdbr[48]=09=09-- goto this rowid, push= curr
DBA 0x100002cb (268436171) OFFSET 2609 BBED> x /r=09=09=09=09=09-- view the row rowdata[1929] @2609
flag_at_2609: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock_at_2610: 0x00 cols_at_2611: 8 col 0[3] @2612: 0xc2 0x4e 0x53 col 1[5] @2616: 0x43 0x4c 0x41 0x52 0x4b col 2[7] @2622: 0x4d 0x41 0x4e 0x41 0x47 0x45 0x52 col 3[3] @2630: 0xc2 0x4f 0x28 col 4[7] @2634: 0x77 0xb5 0x06 0x09 0x01 0x01 0x01 col 5[3] @2642: 0xc2 0x19 0x33
BBED> x /rn2cntn=09=09=09=09-- set the datatypes
rowdata[1929] @2609
flag_at_2609: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock_at_2610: 0x00 cols_at_2611: 8 col 0[3] @2612: 7782 col 1[5] @2616: CLARK col 2[7] @2622: MANAGER col 3[3] @2630: 7839 col 4[7] @2634: 09-JUN-81 col 5[3] @2642: 2450
BBED> pop =09=09=09=09=09=09-- restore old block
>Cheers,
>
>Vasan.
>-----Original Message-----
>From: Denham Eva [mailto:EVAD_at_TFMC.co.za]
>Sent: 19 April 2004 08:58
>To: Oracle-L (E-mail 2)
>Subject: Corrupt Data Block, some advice, pls?
>
>Hello Group,
>
>We had a Disk go on us the other day, I got a=3D20
>
>***
>Corrupt block relative dba: 0x03012945 (file 12, block 76101)
>Bad header found during buffer read
>Data in bad block -
> type: 6 format: 2 rdba: 0x03012945
> last change scn: 0x0000.05dae8f2 seq: 0x2 flg: 0x00
> consistency value in tail: 0xe8f20602
> check value in block header: 0xc1d5, block checksum disabled
> spare1: 0x0, spare2: 0x0, spare3: 0x0
>***
>
>In the Alert Log. The disk was replaced and the Raid rebuilt.
>
>I also dropped and rebuilt the object involved, all successful.=
Backup =3D
>also runs smoothly without error.
>
>However when I do a DB_Verify, I get the following
>
>E:\oracle>dbv file=3D3De:\oracle\oradata\xxxxxx\xxxxxxxx05.ora =3D
>feedback=3D3D1000 blocksi
>ze=3D3D8192
>
>DBVERIFY: Release 8.1.7.4.1 - Production on Mon Apr 19 09:32:13=
2004
>
>(c) Copyright 2000 Oracle Corporation. All rights reserved.
>
>DBVERIFY - Verification starting : FILE =3D3D =3D
>e:\oracle\oradata\xxxx\xxxxxx05.or
>a
>................................................................=
.........=3D
>....Page
> 76101 is marked corrupt
>***
>Corrupt block relative dba: 0x03012945 (file 0, block 76101)
>Bad header found during dbv:
>Data in bad block -
> type: 6 format: 2 rdba: 0x03012945
> last change scn: 0x0000.05dae8f2 seq: 0x2 flg: 0x00
> consistency value in tail: 0xe8f20602
> check value in block header: 0xc1d5, block checksum disabled
> spare1: 0x0, spare2: 0x0, spare3: 0x0
>***
>
>.....
>................................................................=
.........=3D
>........
>
>................................................................=
.........=3D
>........
>
>.................
>
>DBVERIFY - Verification complete
>
>Total Pages Examined : 256000
>Total Pages Processed (Data) : 194147
>Total Pages Failing (Data) : 0
>Total Pages Processed (Index): 513
>Total Pages Failing (Index): 0
>Total Pages Processed (Other): 123
>Total Pages Empty : 61216
>Total Pages Marked Corrupt : 1
>Total Pages Influx : 0
>
>Question is Is there some way that to correct Oracle's marked=
status, or =3D
>should I live with it?
>
>TIA
>Regards
>Denham
>----------------------------------------------------------------=
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------=
>To unsubscribe send email to: oracle-l-request_at_freelists.org
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>----------------------------------------------------------------=
-
>
>________________________________________________________________=
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------=
>To unsubscribe send email to: oracle-l-request_at_freelists.org
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>----------------------------------------------------------------=
-
>
>.
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon May 31 2004 - 23:33:43 CDT
![]() |
![]() |