What information is stored in the redo change vectors exactly [message #112763] |
Tue, 29 March 2005 03:49 |
deepa_balu
Messages: 74 Registered: March 2005
|
Member |
|
|
In concepts it is mentioned that "Redorecords are change vectors describing
a single atomic change to the database."
So In case of recovery these redorecords are applied to recover the
changes done.
What exactly these redorecords contain.
Do they contain all the queries,commit/rollback which are executed on the
database
What information is stored in the vectors exactly
|
|
|
Re: What information is stored in the redo change vectors exactly [message #112813 is a reply to message #112763] |
Tue, 29 March 2005 08:54 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
My understanding is that redo stores enough information to reproduce whatever happened. In the case of an insert, you would need the values that were inserted. In the case of a delete, you would only need (for example) the rowid's of the records to be deleted. You can set up some tests to measure how much redo is generated by different types of operations.
You can also configure redo to hold more if you are doing things such as logical standby databases. Also it takes additional space to record information about different statements and transactions, which is why one statement that affects 1000 rows generates less redo than 1000 individual statements each affecting one row.
The detailed backup recovery and administration guides go into more detail than this and than the concepts guide does. Also Tom Kyte has written about it in his book and website.
|
|
|
|
|
Re: What information is stored in the redo change vectors exactly [message #112951 is a reply to message #112855] |
Wed, 30 March 2005 01:38 |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
hi
to explain what redolog contain ....>>>>>>>well
Log minor is a utility use to read content of redo log file and archive log file
Note :- archive file are copy of redologfile, archive file are generated when database is running in archive log mode...when there is a log switch arch background proces gets activated and archive file is created.
so it is better to know how to use log minor...
Objective of redo log file are as below :
--Redo log files are used to minimize the loss of data.
--Redo log file records the changes made to database.
--They are used ONLY FOR DATABASE RECOVERY.
--In case of instance failure, it will recover committed data that has not been written to disk.
regard
sunil
|
|
|
|
|
|
Re: What information is stored in the redo change vectors exactly [message #113474 is a reply to message #113015] |
Mon, 04 April 2005 01:32 |
d.c.b.a
Messages: 44 Registered: March 2005 Location: China
|
Member |
|
|
The following is my research.
Quote: |
/////////////////////////////////////////////
// The first part of the Change Vector
/////////////////////////////////////////////
Case 1
===============================================================
PIECE#=0x0001 OFFS=0x0084 LEN1=0x0014 LEN2=0x0014
===============================================================
OS DUMP:
00128/0080: d400 700e 1200 0000 0000 2a00
00144/0090: 3800 0000 2800 1600
ORACLE DUMP:
ktudb redo: siz: 212 spc: 3696 flg: 0x0012 seq: 0x0028 rec: 0x16
xid: 0x0000.02a.00000038
================================================================
0x00-0x01 : siz
0x02-0x03 : spc
0x04-0x05 : flg
0x06-0x07 : ?
0x08-0x0f : xid
0x10-0x11 : seq
0x12-0x13 : rec
/////////////////////////////////////////////
// The second part of the Change Vector
////////////////////////////////////
/////////
Case 1
=================================================================
PIECE#=0x0002 OFFS=0x0098 LEN1=0x0030 LEN2=0x0030
=================================================================
OS DUMP:
00144/0090: 0f00 0000 0f00 0000
00160/00a0: 0000 0000 0000 0000 0b01 2a00 0800 0100
00176/00b0: 0400 4000 2800 1500 c64f 1800 0000 0000
00192/00c0: c84f 1800 0000 0000
ORACLE DUMP:
ktubl redo: slt: 42 rci: 0 opc: 11.1 objn: 15 objd: 15 tsn: 0
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00400004.0028.15
prev ctl max cmt scn: 0x0000.00184fc6 prev tx cmt scn: 0x0000.00184fc8
===================================================================
0x00 - 0x03 : objn
0x04 - 0x07 : objd
0x08 - 0x0b : ?
0x0c - 0x0f : ?
0x10 - 0x11 : opc
0x12 - 0x13 : slt
0x14 - 0x15 : ?
0x16 - 0x17 : ?
0x18 - 0x1f : prev ctl uba
0x20 - 0x25 : prev ctl max cmt scn
0x26 - 0x2b : prev tx cmt scn
0x2c - 0x2f : ?
/////////////////////////////////////////////
// The third part of the Change Vector
/////////////////////////////////////////////
Case 1
=================================================================
PIECE#=0x0003 OFFS=0x00c8 LEN1=0x001c LEN2=0x001c
=================================================================
OS DUMP:
00192/00c0: 0401 0000 0000 2900
00208/00d0: 3800 0000 0400 4000 2800 1500 0080 0000
00224/00e0: 0533 1a00
ORACLE DUMP:
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
op: L itl: scn: 0x0000.029.00000038 uba: 0x00400004.0028.15
flg: C--- lkc: 0 scn: 0x0000.001a3305
=================================================================
0x00 - 0x00 : op
0x01 - 0x01 : ver
0x02 - 0x02 : op: L
0x03 - 0x03 : itl
0x04 - 0x0b : scn
0x0c - 0x13 : uba
0x14 - 0x15 : flg & lkc
0x16 - 0x1b : scn
/////////////////////////////////////////////
// The forth part of the Change Vector
/////////////////////////////////////////////
Case 1
=================================================================
PIECE#=0x0004 OFFS=0x00e4 LEN1=0x0020 LEN2=0x001e
=================================================================
OS DUMP:
00224/00e0: 3a00 4000 3900 4000 ff12 0501
00240/00f0: 0100 0000 2c00 0000 0200 0c0b 0000 0000
00256/0100: 0000 0000
ORACLE DUMP:
KDO Op code: URP xtype: XA bdba: 0x0040003a hdba: 0x00400039
itli: 1 ispac: 0 maxfr: 4863
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 0
ncol: 12 nnew: 11 size: 0
=================================================================
0x01 - 0x03 : bdba
0x04 - 0x07 : hdba
|
|
|
|