Install Oracle10g bbed

Source: Internet
Author: User
Tags ibase

Bbed is the full name of Oracle block Brower and Editor tool. It can be used to change data blocks.

The installation process is as follows:

CD $ ORACLE_HOME/rdbms/lib

Make-F ins_rdbms.mk $ ORACLE_HOME/rdbms/lib/bbed

Linking bbed utility (bbed)
Rm-F/Oracle/caty12/home/products/10203/rdbms/lib/bbed
/Usr/CCS/bin/LD-O/Oracle/caty12/home/products/10203/rdbms/lib/bbed
-L/Oracle/caty12/home/products/10203/rdbms/lib/
-L/Oracle/caty12/home/products/10203/lib/-dy
/Oracle/caty12/home/products/10203/lib/Prod/lib/V9/crti. o
/Oracle/caty12/home/products/10203/lib/Prod/lib/V9/crt1.o
/Oracle/caty12/home/products/10203/lib/s0main. o
/Oracle/caty12/home/products/10203/rdbms/lib/ssbbded. o
/Oracle/caty12/home/products/10203/rdbms/lib/sbbdpt. o' cat
/Oracle/caty12/home/products/10203/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10
-Lnzjs10-ln10-lnnz10-lnl10
/Oracle/caty12/home/products/10203/rdbms/lib/defopt. O-ldbtools10-lclntsh
'Cat/Oracle/caty12/home/products/10203/lib/ldflags '-lnsslb10-lncrypt10
-Lnsgr10-lnzjs10-ln10-lnnz10-lnl10-lnro10 'cat
/Oracle/caty12/home/products/10203/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10
-Lnzjs10-ln10-lnnz10-lnl10-lclient10-lnnetd10-lvsn10-lcommon10
-Lgeneric10-lmm-lsnls10-lnls10-lcore10-lsnls10-lnls10-lcore10-lsnls10
-Lnls10-lxml10-lcore10-lunls10-lsnls10-lnls10-lcore10-lnls10 'cat
/Oracle/caty12/home/products/10203/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10
-Lnzjs10-ln10-lnnz10-lnl10-lnro10'cat
/Oracle/caty12/home/products/10203/lib/ldflags '-lnsslb10-lncrypt10-lnsgr10
-Lnzjs10-ln10-lnnz10-lnl10-lclient10-lnnetd10-lvsn10-lcommon10
-Lgeneric10-lsnls10-lnls10-lcore10-lsnls10-lnls10-lcore10-lsnls10
-Lnls10-lxml10-lcore10-lunls10-lsnls10-lnls10-lcore10-lnls10-lclient10
-Lnnetd10-lvsn10-lcommon10-lgeneric10-lsnls10-lnls10-lcore10-lsnls10
-Lnls10-lcore10-lsnls10-lnls10-lxml10-lcore10-lunls10-lsnls10-lnls10
-Lcore10-lnls10 'cat/Oracle/caty12/home/products/10203/lib/sysliblist'-R
/Opt/sunwcluster/lib/sparcv9:/Oracle/caty12/home/products/10203/lib:/opt/orclclu
Ster/lib/-y
P,:/opt/sunwcluster/lib/sparcv9:/opt/orclcluster/lib/:/usr/CCS/lib/sparcv9:/usr/
LIB/sparcv9-QY-LC-laio-lposix4-lkstat-LM
/Oracle/caty12/home/products/10203/lib/Prod/lib/V9/crtn. o

CP $ ORACLE_HOME/rdbms/lib/bbed $ ORACLE_HOME/bin

Bbed
Password: <Blockedit> (The default password for bbed is blockedit)

Bbed: Release 2.0.0.0.0-limited production on Wed Sep 16 23:14:39 2009

Copyright (c) 1982,200 5, Oracle. All rights reserved.

*************!!! For Oracle internal use only !!! ***************

Bbed>Help all
Set DBA [DBA | file #, block #]
Set filename 'filename'
Set 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]
:
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] =
: [DBA | file | filename | block | offset | symbol | * symbol]
: [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>

 

 

 

SQL> SELECT FILE # | ''| Name |'' | bytes from V $ datafile;

File # | ''| Name |'' | bytes
--------------------------------------------------------------------------------
1/u01/Oracle/oradata/ora10g/system01.dbf 503316480
2/u01/Oracle/oradata/ora10g/undotbs1.dbf 104857600
3/u01/Oracle/oradata/ora10g/sysaux01.dbf 272629760
4/u01/Oracle/oradata/ora10g/users01.dbf 876871680
7/u01/Oracle/oradata/ora10g/test01.dbf 10485760

 

 

 

[Oracle @ DBA ~] $ VI filelist.txt

1/u01/Oracle/oradata/ora10g/system01.dbf 503316480
2/u01/Oracle/oradata/ora10g/undotbs1.dbf 104857600
3/u01/Oracle/oradata/ora10g/sysaux01.dbf 272629760
4/u01/Oracle/oradata/ora10g/users01.dbf 876871680
7/u01/Oracle/oradata/ora10g/test01.dbf 10485760

[Oracle @ localhost ~] $ VI bbed. Par
Blocksize = 8192
Listfile =/home/Oracle/filelist.txt
Mode = Edit

 

[Oracle @ DBA ~] $ Bbed parfile = bbed. Par
Password:

Bbed: Release 2.0.0.0.0-limited production on TUE Aug 28 17:06:06 2012

Copyright (c) 1982,200 5, Oracle. All rights reserved.

*************!!! For Oracle internal use only !!! ***************

Bbed>

 

Bbed> show
File #1
Block #1
Offset 0
DBA 0x00400001 (4194305)
Filename/u01/Oracle/oradata/ora10g/system01.dbf
Bifile. BBD
Listfile/home/Oracle/filelist.txt
Blocsize 8192
Mode Edit
Edit unrecoverable
IBase Dec
Obase Dec
Width 80
Count 1, 512
Logfile log. BBD
Spool No

 

SQL> conn Scott/Tiger
SQL> drop table T1 purge;
SQL> Create Table T1 as select * from EMP;

Table created.

SQL> select file_id, block_id, bytes from dba_extents where owner = 'Scott 'and segment_name = 't1 ';

File_id block_id bytes
------------------------------
4 65 65536

View database information under bbed

Bbed> info all
File # name size (blks)
-------------------
1/u01/Oracle/oradata/ora10g/system01.dbf 61440
2/u01/Oracle/oradata/ora10g/undotbs1.dbf 12800
3/u01/Oracle/oradata/ora10g/sysaux01.dbf 33280
4/u01/Oracle/oradata/ora10g/users01.dbf 107040
7/u01/Oracle/oradata/ora10g/test01.dbf 1280

 

 

Bbed> set file 4 block 65
File #4
Block #65

Bbed> d
File:/u01/Oracle/oradata/ora10g/users01.dbf (4)
Block: 65 offsets: 0 to 511 DBA: 0x01000041
------------------------------------------------------------------------
20a20000 41000001 860b6f00 00000204 665c0000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 04000000 ffffffff 04000000 03000000
01000100 00000000 00000000 00000000 00000000 04000000 00000000
00000000 00000000 00000000 00000000 42000001 00000000 00000000
08000000 45000001 00000000 00000000 00000000 04000000 00000000
31cb0000 00000000 00000000 41000001 08000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 11110000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

 

 

Bbed> M/X 7ccc
File:/u01/Oracle/oradata/ora10g/users01.dbf (4)
Block: 65 offsets: 0 to 511 DBA: 0x01000041
------------------------------------------------------------------------
7ccc0000 41000001 860b6f00 00000204 665c0000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 04000000 ffffffff 04000000 03000000
01000100 00000000 00000000 00000000 00000000 04000000 00000000
00000000 00000000 00000000 00000000 42000001 00000000 00000000
08000000 45000001 00000000 00000000 00000000 04000000 00000000
31cb0000 00000000 00000000 41000001 08000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 11110000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

 

Bbed> sum apply
Check value for file 4, block 65:
Current = 0x323a, required = 0x323a

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.