"ORACLE" Dump dump Redo log, undo segment and Table segment

Source: Internet
Author: User

1.1UseOradebug

- -Start task

Oradebug Setmypid

-- Set the name of the dump file to indicate

Alter session Set Tracefile_identifier=undo

-- view dump file

Sql> Oradebug Tracefile_name;

C:\opt\oracle\product\10.2.0\admin\rundb\udump\rundb_ora_6660_pra1.trc

-- Set permissions

Oradebug Unlimit

-- View a list of possible dumps:

Sql> Oradebug Dumplist

EVENTS

trace_buffer_on

Trace_buffer_off

--oradebug Dump command

(1) Oradebug dump buffers 1

Dump buffer information: 1= Only buffer header

1.2Usealter system dump RedoLog

--dump Redo Log

alter system dump logfile ' C:\OPT\ORACLE\PRODUCT\10.2.0\ORADATA\RUNDB\REDO02. LOG ';

1.3Usealter system Dump TABLEData block

-- View the location of the scott.stu table:

Select Header_file, header_block,bytes,blocks,initial_extent,extents,next_extent from Dba_segme

NTS where segment_type= ' TABLE ' and owner= ' SCOTT ' and segment_name= ' STU ';

Header_file header_block BYTES BLOCKS initial_extent extents

----------- ------------ ---------- ---------- -------------- ----------

Next_extent

-----------

4 203 65536 8 65536 1

The location of the //scott.stu is : datafile 4 block 203, which occupies 8 blocks, and is a exntents continuous space.

--dump Header information (Segment header) information

Alter system dump DATAFILE 4 block 203;

--dump All data blocks (8 ) information for all tables

Alter system dump DATAFILE 4 block min 203 block Max 210;

1.4Usealter system dump undoParagraph information andundoRecord information1.4.1 Dump undoParagraphHeaderInformation

--- view undo Segments_name

Sql> Select Segment_name from dba_segments where segment_type= ' TYPE2 UNDO ';

Segment_name

--------------------------------------------------------------------------------

_syssmu1$

_syssmu2$

_syssmu3$

_syssmu4$

.....

or sql> select Segment_id,segment_name,block_id,status from Dba_rollback_segs;

segment_id segment_name block_id STATUS

---------- ------------------------------ ---------- ----------------

0 SYSTEM 9 ONLINE

1 _syssmu1$ 9 ONLINE

2 _syssmu2$ ONLINE

......

----Dump Undo Header

Sql> alter system dump Undo header ' _syssmu1$ ';

1.4.2 According to XID dump undo record

-- query xid:undo segment number,slot number,wrap value

Sql> Select Trunc (id1/65536) usn,mod (id1,65536) Slot,id2 Wrap,lmode from V$lock where type= ' TX ';

USN SLOT WRAP Lmode

---------- ---------- ---------- ----------

2 43 313 6

--dump Unod Records

ALTER SYSTEM DUMP UNDO BLOCK ' _syssmu2$ ' XID 2 43 313

1.5 stu SegmentA block of data in a table (segment)DumpInformation

-- data block information:

Buffer Tsn:4 rdba:0x010000cc (4/204)

Itl Xid Uba Flag Lck SCN/FSC

0x01 0x0006.012.0000013b 0x00800127.011a.01--u-1 FSC 0X0000.000C44BC

0x02 0x0000.000.00000000 0x00000000.0000.00----0 FSC 0x0000.00000000

Block_row_dump:

tab 0, row 0, @0x1f85

TL:19 FB:--h-fl--lb:0x1 Cc:4

Col 0: [2] C1 06

Col 1: [3] C2 15 09

Col 2: [5] 6d 69 74 68

Col 3: [2] C1 1a

End_of_block_dump

//itl Transaction List index, which is used for row lock bytes:lb: the display is locked by that transaction.

//XID : undo the transactions in ID,

//uba: undo Record address generated by transaction

//flag: transaction state. --u- The upper bound,c------ submitted clearly;

Lck: The number of rows locked in a block is changed.

_________________________________________________________________________________

Http://blog.csdn.net/clark_xu Xu Changliang Column Original

__________________________________________________________________________________

"ORACLE" Dump dump Redo log, undo segment and Table segment

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.