Home » RDBMS Server » Server Administration » What information is stored in the redo change vectors exactly
What information is stored in the redo change vectors exactly [message #112763] Tue, 29 March 2005 03:49 Go to next message
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 Go to previous messageGo to next message
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 #112816 is a reply to message #112813] Tue, 29 March 2005 09:01 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
martin,
The OP has posted the same to comp.databases and Jonathan Lewis has responded with a great explanation ( as usual).
You may want have a look. definatly worth it.
Re: What information is stored in the redo change vectors exactly [message #112855 is a reply to message #112763] Tue, 29 March 2005 12:49 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Thanks, will do.
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 Go to previous messageGo to next message
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 #112973 is a reply to message #112951] Wed, 30 March 2005 05:24 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Sunil,
Did you read the original question?
Your response is completely unrelated to it.
Re: What information is stored in the redo change vectors exactly [message #113013 is a reply to message #112973] Wed, 30 March 2005 09:53 Go to previous messageGo to next message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
hi
mahesh can u tell me what exactly question is .... i thought that question was how to see what exactly redolog contents are ...

friend
sunil ..
Re: What information is stored in the redo change vectors exactly [message #113015 is a reply to message #113013] Wed, 30 March 2005 10:09 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
The OP was looking info on change vectors
and Jonathan lewis responded as (Amazingly beautiful and insight answer. For anyone intrested in internals , here is posting)
A redo record is made up of one or more redo change vectors.
A redo change vector describes a change to a block in the database.

For example, until 10g, a committed transaction that did a
single update to an unindexed table would produce:

Change record 1
    change vector 1
        describing the acquisition of a slot in a rollback segment header
Change record 2
    change vector 1
        describing previous version of material in the table block (plus
some
        information about previous versions of data in the segment header)
    change vector 2
        describing the new version of material in the table block
Change record 3
    change vector 1
        describing the release of the slot in the rollback segment header
        (It is this record that is the 'commit record' described in the
        manuals)

A change vector typically holds information like:
    This is an 'update row piece' operation
    The fourth column of the third row in the block should be 'X'
    The lock byte for this row should be set to 3
    The third ITL entry in the block should be set to 'yyyyyyyyy'

plus various bits of cross-reference material 

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 Go to previous message
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


Previous Topic: Unable to start 2 Oracle services
Next Topic: can user have right on two tablespace ?
Goto Forum:
  


Current Time: Thu Mar 28 11:06:22 CDT 2024