Dumping Oracle
Version 11.2.0.3

General Information
This isn't what you were thinking ... but you have to admit it is a great name.

No: It is about dumping Oracle to trace and will become an accumulation, over time, of information on various techniques for doing so.
 
Database
Dump database block

Demo provided by Richard Foote, Canberra, Australia
CREATE TABLE bowie_stuff (
album  VARCHAR2(30),
year   NUMBER,
rating VARCHAR2(30));

INSERT INTO bowie_stuff VALUES ('Man Who Sold The World', 1970, 'Bloody Good!!');

INSERT INTO bowie_stuff VALUES ('Diamond Dogs', 1974 , 'Brilliant');

INSERT INTO bowie_stuff VALUES ('Outside', 1995, 'Underrated Masterpiece');
COMMIT;

SELECT *
FROM bowie_stuff;

SELECT album, dbms_rowid.rowid_to_absolute_fno(rowid, 'UWCLASS', 'BOWIE_STUFF') ABSOLUTE_FNO,
dbms_rowid.rowid_block_number(rowid) BLOCKNO, dbms_rowid.rowid_row_number(rowid) ROWNUMBER
FROM bowie_stuff
WHERE album LIKE '%Dogs%';

ALTER SYSTEM DUMP DATAFILE 6 BLOCK 21229;
Control File

Level 1: file header
Level 2: database and checkpoint records
Level 3: circular reuse record types
SELECT value
FROM gv$parameter
WHERE name LIKE 'back%dump%dest';

ALTER SESSION SET EVENTS 'immediate trace name control level 3';
 
Instance
PGA (Process Global Area) ORADEBUG DUMP HEAPDUMP 1

ALTER SESSION SET EVENTS 'immediate trace name global_area level 1';
SGA (System Global Area) ORADEBUG DUMP HEAPDUMP 2

ALTER SESSION SET EVENTS 'immediate trace name global_area level 2';
PGA + UGA ORADEBUG DUMP HEAPDUMP 3

ALTER SESSION SET EVENTS 'immediate trace name global_area level 3';
UGA (User Global Area) ORADEBUG DUMP HEAPDUMP 4

ALTER SESSION SET EVENTS 'immediate trace name global_area level 4';
PGA + UGA ORADEBUG DUMP HEAPDUMP 5

ALTER SESSION SET EVENTS 'immediate trace name global_area level 5';
SGA + UGA ORADEBUG DUMP HEAPDUMP 6

ALTER SESSION SET EVENTS 'immediate trace name global_area level 6';
PGA + SGA + UGA ORADEBUG DUMP HEAPDUMP 7

ALTER SESSION SET EVENTS 'immediate trace name global_area level 7';
 
Segments
Datafile Block ALTER SYSTEM DUMP DATAFILE 6 BLOCK 21229;
Dumping an index tree including branch block headers, leaf block headers, and leaf block contents col object_name format a30

SELECT object_name, object_id
FROM user_objects;

ALTER SESSION SET EVENTS 'immediate trace name treedump level 54220';
Alternative index dump ORADEBUG DUMP TREEDUMP 54220;

Related Topics
DBMS_JAVA_DUMP
DBMS_ROWID
ORADEBUG

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2013 Daniel A. Morgan All Rights Reserved