Oracle Dump trace Redo several methods __oracle

Source: Internet
Author: User
Tags dba

Before testing has used a DBA approach, this article tests several other methods, as follows:
1. To dump records based on RBA (Redo blocks address)--based on RDA
2. To dump records based on time
3. To dump records based on layer and opcode--the kernel layer based on the internal operation code; this one's more advanced than usual.
4. Dump the file header information--dump header information, view Redo Header good command



1. To dump records based on RBA (Redo blocks address)--based on RDA
Since to dump redo according to RBA, how to obtain RBA, you can use:
alter system dump logfile ' dump log file ';
Or
alter system dump logfile ' D:\ORACLE11G_64BIT\ORADATA\ORCL\REDO07. LOG ' dba min 276635 dba Max 10 276635;

You can produce trace content such as the following
REDO record-thread:1 rba:0x000314.0000e11f.0010 len:0x00e0 vld:0x06

RBA composition and the meaning of each part:
(1) The log file sequence number (4 bytes)
(2) The log File block number (4 bytes)
(3) The byte offset into the blocks at which the redo record starts (2bytes)

Knowing the meaning of RBA, doing things is simple, the operation is as follows:

---log sequence number
Sql> Select To_number (' The ', ' xxxxxxxxxxx ') from dual;

To_number (' the ' xxxxxxxxxxx ')
------------------------------
788

--block number in the log file
Sql> Select To_number (' e11f ', ' xxxxxxxxxxx ') from dual;

To_number (' e11f ', ' xxxxxxxxxxx ')
------------------------------
57631
Then run the RBA based command
alter system dump logfile ' D:\ORACLE11G_64BIT\ORADATA\ORCL\REDO07. LOG ' RBA min 788 57631 RBA max 788 57631;

The second method of dump log
2. To dump records based on time
I do not test this, you can press a very good post on the internet to test:
http://blog.csdn.net/tianlesoftware/article/details/6670962


The third method of dump log
3. To dump records based on layer and opcode
---this is actually the filter out. Specifies the operation type of the
sql> alter system dump logfile ' D:\ORACLE11G_64BIT\ORADATA\ORCL\REDO07. LOG ' layer opcode 18;

System Altered


The fourth method of dump log
4. Dump the file header information--dump header information, view Redo Header good command
Sql> alter session SET events ' immediate trace name REDOHDR level 6 ';

Session Altered

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.