Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Home
Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients

 

Free Oracle Tips


 
HTML Text AOL

Free Oracle App Server Tips


 
HTML Text

Oracle support

Oracle training

Oracle tuning

Rednecks!

Remote Oracle

Custom Oracle Training

Donald K. Burleson

Oracle Tips

 

Dumping Oracle database blocks

 

Oracle provides several undocumented ALTER SESSION commands that can be used to dump details from the Oracle internal control structures. These can be very useful for investigating Oracle corruptions and peeking into the Oracle internal structures.

 

To do this, you must first start by getting the data block address (DBA) for the block that you want to display. This is done by taking the file number and block number and running the dbms_utility.make_data_block_address function.

 

For example, you can use the dbms_utility package to get a data block address.  Many Oracle scripts will provide you with the file number and block number, but you must then translate this information into the actual data block address (DBA) for the block.

 

For example, to dump file number 101, block 50, you could enter the following PL/SQL.

 

variable dba varchar2;

exec :dba := dbms_utility.make_data_block_address(101,50);

print dba

 

Next, you take the resulting DBA and use it with the alter session command to dump the contents of the data block.  In this example, we assume that we have returned data block address 10059

 

alter session set events 'immediate trace name blockdump level 10059';

 

We can then go to our trace file directory (usually BDUMP) and view the trace file with the detailed block contents.

 

While Oracle does not provide data descriptions (DESCTS) for the data blocks, with a little work and intuition, you can reckon the details of the block header and footers, while seeing the actual contents of the data rows.

 

 

 

 

 

 
 
 

Oracle performance tuning book

 

 

Oracle performance tuning software

 
Oracle performance tuning software
 
Oracle performance Tuning 10g reference poster
 
Oracle training in Linux commands
 
Oracle training Excel
 
 
 
 
 
email BC:


Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.