Thursday, May 01, 2008

Dump an Oracle Block to the trace

This is the script I use to dump an Oracle block.

set pagesize 0
set def =
set def &
column header_block new_value m_block
column header_file new_value m_file

select
header_file,
header_block + &m_offset header_block
from
dba_segments
where
segment_name = upper('&m_segment')
and nvl(partition_name,'xxx') = nvl(upper('&m_partition'),'xxx')
and owner = upper('&m_owner')
;

alter system dump datafile &m_file block min &m_block block max &m_block;

3 comments:

Asif Momen said...

This is my first visit to your blog.

Hope to see you more active on your blog as you are on OTN Forums.

Hector Rivera Madrid said...

Thanks for your suggestion, I will do, being participative in forums, writing the Blog and doing other activities are always time consuming. At the time I've got several things I would like to publish, and I'll do my best effort to do it.

Ignacio Ruiz said...

Estimado Hector, las exposiciones en tu blog son muy interesantes y me gustaria saber si estarias dispuesto a participar en un proyecto de divulgacion electronica de material sobre Oracle pero en los idiomas de uso comun en latinoamerica: Español, Portugues y Frances.

Si estas interesado escribeme a ignacio.ruiz@computer.org (tambien esta en mi perfil) para compartirte los detalles.
Saludos