Start your bbed trip.
By default, bbed is linked to the Rdbms/lib directory. Obviously, it's not the $oracle_home/bin directory we use very often. The linked bbed executable file can be moved to the bin directory, and if you don't move, you can start bbed in the Rdbms/lib directory.
[Oracle@rdbalinux03 bin]$ bbed
Password: Hu Jintao
Bbed:release 2.0.0.0.0–limited Production on Mon Sep 19 10:00:27 2005
copyright©1982, 2002, Oracle Corporation. All rights reserved.
********** !!! For Oracle Internal with only!!! **********
Bbed>
Note If you do not enter the correct password, you cannot start the bbed. This password prevents bbed from being used without authorization. Passwords are hard-coded in Oracle and do not depend on any client settings.
If you know enough about Oracle's internal security considerations for this document and the tool, you can use the standard reverse engineering to get the password.
Several command-line arguments are available that allow configuration and specific behavior to be edited. Also, it allows bbed settings to be browse rather than compile-mode, which is recommended for the first person to use this tool to make sure that the Oracle's data files are not improperly manipulated to cause damage.
The following table lists the available command line options:
Options |
Describe |
BLOCKSIZE |
The data block size of the data file to edit |
MODE |
Bbed Execution Mode (browse or edit) |
Silent |
Send output to standard output (Y or N) |
SPOOL |
Send output to Bbed.log file (Y or N) |
ListFile |
List of files that will be edited |
Cmdfile |
List of file names that will be edited |
Bifile |
Undo file name, default to BIFILE.BBD |
LOGFILE |
The user's log file name, which defaults to LOG.BBD |
Parfile |
All the parameter files listed above for the command |
Because several of the above commands may be required, it is recommended that you use the Parfile option to put all the options you need to use in one file. The following example is a bbed parfile based on a small database, the size of a 8kb block of data.
[Oracle@pingu bbed]$ Cat Bbed.par
blocksize=8192
Listfile=/home/oracle/bbed/fileunix.log
Mode=edit
In the example above, we set the block size to 8KB and set the bbed to edit mode, so we can change the contents of the block of data. In addition, we provide the ability to list all the files to be edited in the same file.
The file list should include the name of the file to edit, the file ID and the file size in bytes. Here is an example based on a small database:
[Oracle@pingu bbed]$ Cat Fileunix.log
1/HOME/ORACLE/ORAHOME1/ORADATA/GCTDEV2/DRSYS01.DBF 20971520
2/HOME/ORACLE/ORAHOME1/ORADATA/GCTDEV2/EXAMPLE01.DBF 125829120
... (Below also, omitted, the PDF can not copy paste directly, cups ...) )
Note: The file list can be obtained by executing the following command in the database:
Sql> Select File#| | ' '|| name| | ' '|| bytes from V$datafile;