Installing Oracle Block Browser and Editor tool (bbed), installingbbed
BBED is an internal ORACLE tool. Generally, BBED is used to restore faulty databases, for example, if the data file header is inconsistent due to power failure or abnormal shutdown of the operating SYSTEM, or the SYSTEM tablespace is damaged, you can use the BBED tool for recovery. The following error is usually reported during compilation in 11G: [oracle @ ogg1 lib] $ make-f ins_rdbms.mk $ ORACLE_HOME/rdbms/lib/bbed
Linking BBED utility (bbed)
Rm-f/opt/oracle/products/11.2.0/rdbms/lib/bbed
Gcc-o/opt/oracle/products/11.2.0/rdbms/lib/bbed-m64-L/opt/oracle/products/11.2.0/rdbms/lib/-L/opt/oracle /products/11.2.0/lib/-L/opt/oracle/products/11.2.0/lib/stubs/opt/oracle/products/11.2.0/lib/s0main. o/opt/oracle/products/11.2.0/rdbms/lib/ssbbded. o/opt/oracle/products/11.2.0/rdbms/lib/sbbdpt. o 'cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-lnsgr11-lnzjs11-ln11-lnl11-ldbtools11-lclntsh 'cat/opt/oracle/products/11.2.0 /lib/ldflags '-lncrypt11-lnsgr11-lnzjs11-ln11-lnl11-lnro11 'cat/opt/oracle/products/11.2.0/lib/ldflags'-lncrypt11-lnsgr11-ln- 11 -lnl11-linear-lzt11-linear-lclient11-linear-lvsn11-lcommon11-lgeneric11-lmm-linear-lnls11-lcore11-linear-lnls11-lcore11-linear-lnls11-lxml11 -lcore11-lunls11-lsnls11-lnls11-lcore11-lnls11 'cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-lnsgr11-Restart-ln11-lnl11-lnro11' cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-encrypt-ln11-lnl11-lclient11-lnnetd11-lvsn11-lcommon11-lgeneric11-Restart-lnls11-lcore11 -Example-lnls11-lcore11-Example-lnls11-lxml11-lcore11-lunls11-Example-lnls11-lcore11-lnls11-lclient11-Example-lvsn11-Example-lgeneric11-Example-lnls11 -benchmark-lnls11-lcore11-lsnls11-lnls11-lxml11-lcore11-lunls11-lsnls11-lnls11-lcore11-lnls11 'cat/opt/oracle/products/11.2.0/lib/sysliblist '- wl, -rpath, /opt/oracle/products/11.2.0/lib-lm 'cat/opt/oracle/products/11.2.0/lib/sysliblist '-ldl-lm-L/opt/oracle/products/ 11.2.0/lib
Gcc:/opt/oracle/products/11.2.0/rdbms/lib/ssbbded. o: No such file or directory
Gcc:/opt/oracle/products/11.2.0/rdbms/lib/sbbdpt. o: No such file or directory
Make: *** [/opt/oracle/products/11.2.0/rdbms/lib/bbed] Error 1
It is because the corresponding library file is missing, but we can copy it from 10 GB:
[Oracle @ zbdba3 lib] $ ls * sbb *
Sbbdpt. o ssbbded. o
[Oracle @ zbdba3 lib] $ scp * sbb * 192.168.56.12: 'pwd'
The authenticity of host' 192. 168.56.12 (192.168.56.12) 'can't be established.
RSA key fingerprint is de: 78: 11: e4: 45: be: 48: 83: 50: 5f: c8: 6e: 08: ad: AE: 7e.
Are you sure you want to continue connecting (yes/no )? Yes
Warning: Permanently added '192. 168.56.12 '(RSA) to the list of known hosts.
Oracle@192.168.56.12's password:
Scp:/u01/app/oracle/product/10.2.0/db_1/rdbms/lib: No such file or directory
[Oracle @ zbdba3 lib] $ scp * sbb * 192.168.56.12:/opt/oracle/products/11.2.0/rdbms/lib
Oracle@192.168.56.12's password:
Sbbdpt. o 100% 1863 1.8KB/s
Ssbbded. o 100% 1191 1.2KB/s
[Oracle @ zbdba3 mesg] $ scp * bbed * 192.168.56.12:/opt/oracle/products/11.2.0/rdbms/mesg
Oracle@192.168.56.12's password:
Bbedus. msb 100% 8704 8.5KB/s
Bbedus. msg 100% 10KB 10.0KB/s
Re-compile:
[Oracle @ ogg1 lib] $ make-f ins_rdbms.mk $ ORACLE_HOME/rdbms/lib/bbed
Linking BBED utility (bbed)
Rm-f/opt/oracle/products/11.2.0/rdbms/lib/bbed
Gcc-o/opt/oracle/products/11.2.0/rdbms/lib/bbed-m64-L/opt/oracle/products/11.2.0/rdbms/lib/-L/opt/oracle /products/11.2.0/lib/-L/opt/oracle/products/11.2.0/lib/stubs/opt/oracle/products/11.2.0/lib/s0main. o/opt/oracle/products/11.2.0/rdbms/lib/ssbbded. o/opt/oracle/products/11.2.0/rdbms/lib/sbbdpt. o 'cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-lnsgr11-lnzjs11-ln11-lnl11-ldbtools11-lclntsh 'cat/opt/oracle/products/11.2.0 /lib/ldflags '-lncrypt11-lnsgr11-lnzjs11-ln11-lnl11-lnro11 'cat/opt/oracle/products/11.2.0/lib/ldflags'-lncrypt11-lnsgr11-ln- 11 -lnl11-linear-lzt11-linear-lclient11-linear-lvsn11-lcommon11-lgeneric11-lmm-linear-lnls11-lcore11-linear-lnls11-lcore11-linear-lnls11-lxml11 -lcore11-lunls11-lsnls11-lnls11-lcore11-lnls11 'cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-lnsgr11-Restart-ln11-lnl11-lnro11' cat/opt/oracle/products/11.2.0/lib/ldflags '-lncrypt11-encrypt-ln11-lnl11-lclient11-lnnetd11-lvsn11-lcommon11-lgeneric11-Restart-lnls11-lcore11 -Example-lnls11-lcore11-Example-lnls11-lxml11-lcore11-lunls11-Example-lnls11-lcore11-lnls11-lclient11-Example-lvsn11-Example-lgeneric11-Example-lnls11 -benchmark-lnls11-lcore11-lsnls11-lnls11-lxml11-lcore11-lunls11-lsnls11-lnls11-lcore11-lnls11 'cat/opt/oracle/products/11.2.0/lib/sysliblist '- wl, -rpath, /opt/oracle/products/11.2.0/lib-lm 'cat/opt/oracle/products/11.2.0/lib/sysliblist '-ldl-lm-L/opt/oracle/products/ 11.2.0/lib
[Oracle @ ogg1 lib] $ ls-l bbed
-Rwxr-xr-x 1 oracle oinstall 262144 Sep 4 bbed
[Oracle @ ogg1 mesg] $ bbed
Password: blockedit
BBED: Release 2.0.0.0.0-Limited Production ction on Thu Sep 4 03:54:08 2014
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
*************!!! For Oracle Internal Use only !!! ***************
BBED> help all
Set dba [dba | file #, block #]
Set filename 'filename'
Set file file #
Set block [+/-] block #
Set offset [[+/-] byte offset | symbol | * symbol]
Set blocksize bytes
Set list [FILE] 'filename'
Set width character_count
Set count bytes_to_display
Set ibase [HEX | OCT | DEC]
Set obase [HEX | OCT | DEC]
Set mode [BROWSE | EDIT]
Set spool [Y | N]
SHOW [| ALL]
INFO
MAP [/v] [DBA | FILENAME | FILE | BLOCK]
DUMP [/v] [DBA | FILENAME | FILE | BLOCK | OFFSET | COUNT]
PRINT [/x | d | u | o | c] [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]
EXAMINE [/Nuf] [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]
</Nuf>:
N-a number which specifies a repeat count.
U-a letter which specifies a unit size:
B-b1, ub1 (byte)
H-b2, ub2 (half-word)
W-b4, ub4 (word)
R-Oracle table/index row
F-a letter which specifies a display format:
X-hexadecimal
D-decimal
U-unsigned decimal
O-octal
C-character (native)
N-Oracle number
T-Oracle date
I-Oracle rowid
FIND [/x | d | u | o | c] numeric/character string [TOP | CURR]
COPY [DBA | FILE | FILENAME | BLOCK] TO [DBA | FILE | FILENAME | BLOCK]
MODIFY [/x | d | u | o | c] numeric/character string
[DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]
ASSIGN [/x | d | u | o] <target spec >=< source spec>
<Target spec>: [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]
<Source spec>: [value |]
SUM [DBA | FILE | FILENAME | BLOCK] [APPLY]
PUSH [DBA | FILE | FILENAME | BLOCK | OFFSET]
POP [ALL]
REVERT [DBA | FILE | FILENAME | BLOCK]
UNDO
HELP [| ALL]
VERIFY [DBA | FILE | FILENAME | BLOCK]
CORRUPT [DBA | FILE | FILENAME | BLOCK]
BBED>
For more information:
What is the bbed tool? I heard that the oracle database has a very powerful bbed tool.
"BBED (Oracle Block Brower and EDitor Tool) is a Tool used to directly view and modify data file data. It is an internal Oracle Tool that can directly modify the content of Oracle data file blocks, it is simply a binary editing tool for Oracle. This tool is not supported by Oracle, so it does not generate executable files by default, and needs to be re-compiled before use ."
Compiling the tool in 10 Gb is relatively simple:
[Maclean @ rh2 ~] $ Cd $ ORACLE_HOME/rdbms/lib
[Maclean @ rh2 lib] $ make-f ins_rdbms.mk $ ORACLE_HOME/rdbms/lib/bbed
Make: '/s01/10gdb/rdbms/lib/bbed' is up to date.
[Maclean @ rh2 lib] $ rm bbed
[Maclean @ rh2 lib] $ make-f ins_rdbms.mk $ ORACLE_HOME/rdbms/lib/bbed
Linking BBED utility (bbed)
Rm-f/s01/10gdb/rdbms/lib/bbed
Gcc-o/s01/10gdb/rdbms/lib/bbed-L/s01/10gdb/rdbms/lib/-L/s01/10gdb/lib/-L/s01/10gdb/ lib/stubs // s01/10gdb/lib/s0main. o/s01/10gdb/rdbms/lib/ssbbded. o/s01/10gdb/rdbms/lib/sbbdpt. o 'cat/s01/10gdb/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10-lnzjs10-ln10-lnnz10-lnl10/s01/10gdb/rdbms/lib/defopt. o-ldbtools10-lclntsh 'cat/s01/10gdb/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10-signature-ln10-lnnz10-lnl10-lnro10' cat/s01/10gdb /ldflags '-signature-lncrypt10-signature-ln10-signature-lnl10-lclient10-lnnetd10-lvsn10-lcommon10-lgeneric10-lmm-signature-lnls10-lcore10-signature lnls10- lcore10-lsnls10-lnls10-lxml10-lcore10-lunls10-lsnls10-lnls10-lcore10-lnls10 'cat &#...... remaining full text>
ORACLE data file has bad blocks, error: ORA-01578: ORACLE data block upted (file #6, block #143589) ORA-01110:
The data block can be recovered only after backup.
Basic steps:
1. Enter rman
Rman target/
2. Restore Block Media
Blockrecover datafile 6 block 143589;