In Oracle,How to use dump

shiyihai發表於2007-08-10

It is often useful to dump the internal contents of Oracle internal structures such as the control files, library cache, and redo log headers. The following undocumented Oracle commands can be used for this purpose.

For each of these commands, a trace file will be generated in your UDUMP directory. After issuing the command, you can go to your UDUMP directory to view the contents of the dump.

[@more@]

1 – SCN Dump - This command dumps the control file contents to see SCN information. The SCN information is especially useful when doing a database recovery.
alter session set events 'immediate trace name CONTROLF level 10';

2 – File Header Dump - Here is the command to dump file headers. This dump is also quite useful if you have a corrupt database or a failure from rman in doing a database recovery.
alter session set events 'immediate trace name FILE_HDRS level 10';

3 - Dump redo log headers – This command will dump all of the redo log header information.
alter session set events 'immediate trace name REDOHDR level 10';

4 – System state dump – This command will dump the system state to your trace file.
alter session set events 'immediate trace name SYSTEMSTATE level 10';

5 – Process state dump – This command will dump the process state for all active processes in your database:
alter session set events 'immediate trace name PROCESSSTATE level 10';

6 – Library Cache Dump – This command is very useful for examining library Cache details, especially when you are having high library cache reloads or SQL access contention:
alter session set events 'immediate trace name library_cache level 10';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-941175/,如需轉載,請註明出處,否則將追究法律責任。

相關文章