Monday, January 21, 2013

Linking BBED on Oracle 11g / Linux

The BBED tool is not documented or supported by Oracle for external clients, and is not distributed by Oracle in binary form, so must be compiled when needed.  The libraries needed to compile it have not been distributed in 11g, but it still compiles with files copied from a 10g install.

Of course linking this tool with manually copied libraries, with no documentation or support from Oracle could easily lead to unrecoverable data corruption.  It should be safe to use it to read data from blocks but I don't recommend using BBED to modify data on a database you care about.   Test it against a DEV database, and don't expect support.

1. copy library files from 10g $ORACLE_HOME/rdbms/lib to 11g $ORACLE_HOME/rdbms/lib :-

cp ssbbded.o $ORACLE_HOME/rdbms/lib/
cp sbbdpt.o $ORACLE_HOME/rdbms/lib/

2. copy message files from 10g $ORACLE_HOME/rdbms/mesg to 11g $ORACLE_HOME/rdbms/mesg :-

cp bbedus.msb $ORACLE_HOME/rdbms/mesg/
cp bbedus.msg $ORACLE_HOME/rdbms/mesg/

3. set environment for the 11g $ORACLE_HOME/rdbms/lib and make bbed

cd $ORACLE_HOME/rdbms/lib
make -f BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

4. execute bbed

$ ./bbed

BBED: Release - Limited Production on Mon Jan 21 07:08:13 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************


The password is hard coded in the binary, so you can get a list of likely candidates using  "strings -a bbed" and use trial and error to confirm that the correct one is "BLOCKEDIT"