Question: I'm trying to dump a data
block from Oracle using this command: "Alter system dump datafile 15
block min 987600 block max 551016715;"
Is there any performance effect if you issue this statement against a production
database?
How do I find and interpret the trace file? I cannot find the trace file
in my dump directory.
Answer: First, why would you need to look at
the internals of an Oracle data block? Are your trained to understand the
structures, you need to have the top secret internals documentation (the data
sections or DESECT's), maps for the proprietary internal structures that
make Oracle special. Oracle corporation does not want anybody to
understand how their competitive secrets work, and in 99% of tuning cases, block
internals do not matter. Dumping data blocks is ONLY for Oracle Technical
Support and DBA's with at least a decade of full-time experience, IMHO.
>> Is there any performance effect if you issue this
statement against a production database?
There can be! If you are copying a datafile while it
competes for access on the same disk, you will get thrashing of the read-write
heads, and very slow access speeds.
>> How do I find and interpret the trace file?
You will always see a message in the alert log, giving the
command, date and UDUMP file location. The trace file should always be in
$ORACLE_HOME/admin/udump, and you can do an "ls -alt|head" command to
find it quickly.
If you are familiar with the unpublished and undocumented
Oracle block DESECT's, then you can use online tools (such as BBED), in
conjunction with Oracle Technical Support to view and alter Oracle data blocks.
Also, you can view block contents directly from the OS with third-party tools
and editors. For example, you can use the strings command to see printable
characters with an Oracle data file (.dbf).
Note: Using BBED will make
your database unsupported, unless it is used as part of a Service Request (SR).
Unless you have picked-up the block internals over many years of
experience, ALWAYS Open an SR when dumping Oracle data blocks.
 |
If you like Oracle tuning, you
might enjoy my book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get instant
access to the code depot of Oracle tuning scripts. |