Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Anyone know about x_$kcccp?

Re: Anyone know about x_$kcccp?

From: Danisment UNAL <danisment_at_yahoo.com>
Date: Thu, 08 Feb 2001 02:16:35 -0800
Message-ID: <F001.002AE9ED.20010208004555@fatcity.com>

Hello Yong,

I had participated in "Max SCN - Data dictionary" thread in revealnet.com. I'm pasting here.


Hi,

You can reach max SCN over x$kcccp.CPODS.

if you interested in details you can read followings:

Change vector:


it describes to single change to single block. a sample change vector
from redo logfile dump:

CHANGE #1 TYP:0 CLS:15 AFN:2 DBA:0x0080012e SCN:0x0000.00053e76
SEQ: 1 OP:5.2
ktudh redo: slt: 0x0005 sqn: 0x00000196 flg: 0x0012 siz: 104 fbi: 0
uba: 0x008000c2.004b.09 pxid: 0x0000.000.00000000

Redo record:



group of change vectors describing single atomic change. for example, an
insert statment is a redo record consisting of following change vectors:

a transaction consists of redo records. and redo records are ordered by
SCNs in icreasing order.

a sample of simple insert statement from redolog dump:


REDO RECORD - Thread:1 RBA: 0x0000be.00000002.0038 LEN: 0x01e0
VLD: 0x01
SCN scn: 0x0000.00053e76 01/19/2001 17:04:00 CHANGE #1 TYP:0 CLS:15 AFN:2 DBA:0x0080012e SCN:0x0000.00053e76
SEQ: 1 OP:5.2
ktudh redo: slt: 0x0005 sqn: 0x00000196 flg: 0x0012 siz: 104 fbi: 0
uba: 0x008000c2.004b.09 pxid: 0x0000.000.00000000 CHANGE #2 TYP:0 CLS:16 AFN:2 DBA:0x008000c2 SCN:0x0000.00053e6b
SEQ: 1 OP:5.1
ktudb redo: siz: 104 spc: 774 flg: 0x0012 seq: 0x004b rec: 0x09
xid: 0x0002.005.00000196
ktubl redo: slt: 5 rci: 0 opc: 11.1 objn: 3010 objd: 3010 tsn: 0
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x008000c2.004b.08 prev ctl max cmt scn: 0x0000.00040520 prev tx cmt scn: 0x0000.00040524
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
op: L itl: scn: 0x0001.00b.00000198 uba: 0x0080019e.004a.0c
flg: C--- lkc: 0 scn: 0x0000.00053e71
KDO Op code: DRP xtype: XA bdba: 0x00404a19 hdba: 0x00404a18
itli: 1 ispac: 0 maxfr: 1177
tabn: 0 slot: 1(0x1)
CHANGE #3 TYP:2 CLS: 1 AFN:1 DBA:0x00404a19 SCN:0x0000.00053e71
SEQ: 1 OP:11.2
KTB Redo
op: 0x11 ver: 0x01
op: F xid: 0x0002.005.00000196 uba: 0x008000c2.004b.09 Block cleanout record, scn: 0x0000.00053e76 ver: 0x01, entries follow...
itli: 1 flg: 2 scn: 0x0000.00053e71
KDO Op code: IRP xtype: XA bdba: 0x00404a19 hdba: 0x00404a18
itli: 1 ispac: 0 maxfr: 1177
tabn: 0 slot: 1(0x1) size/delt: 7
fb: --H-FL-- lb: 0x1 cc: 1
null: -
col 0: [ 3] 61 62 63
CHANGE #4 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ: 0
OP:5.19
session number = 7
serial number = 1
current username = SYS
login username = SYS
client info =
OS username = BILL?GATES
Machine name = DEFAULT
OS terminal = DEFAULT
OS process id = 429453570
OS program name = SVRMGRL.EXE

as you see in dump, insert causes respectivly:

Redo Byte Adress(RBA):



shows the location of redo record.

note that, 'SCN scn' shows redo record's SCN, but SCN in change vector
shows SCN which will be applied to object.

there is a structure in controlfile. from controlfile dump(x$kcccp):



CHECKPOINT PROGRESS RECORDS

(blkno = 0x3, size = 104, max = 1, in-use = 1, last-recid= 0)
THREAD #1 - status:0x2 flags:0x0 dirty:3 low cache rba:(0xbe.2.0) on disk rba:(0xbe.5.0) on disk scn: 0x0000.00053e78 01/19/2001 17:04:01 resetlogs scn: 0x0000.00000001 12/25/2000 12:27:05 heartbeat: 419463787 mount id: 2659721494

explanation:

low cache rba: shows which address recovery will start

on disk rba: highest RBA. it's just beyond the last redo generated. this
points to block has not written yet.

on disk scn: SCN of on disk rba. in other words, after last statement
generate a redo record, oracle automaticly will create a redo record at
on disk rba. the SCN of this redo record is the highest SCN in system. in
our sample, it's 0x0000.00053e78. we can confirm this by redolog dump.
from last redo record from redo dump:

REDO RECORD - Thread:1 RBA: 0x0000be.00000004.0010 LEN: 0x0050
VLD: 0x01
SCN scn: 0x0000.00053e78 01/19/2001 17:04:01 CHANGE #1 TYP:0 CLS:15 AFN:2 DBA:0x0080012e SCN:0x0000.00053e76
SEQ: 2 OP:5.4
ktucm redo: slt: 0x0005 sqn: 0x00000196 srt: 0 sta: 9 flg: 0x2
ktucf redo: uba: 0x008000c2.004b.09 ext: 1 spc: 668 fbi: 0
END OF REDO DUMP SCN scn: 0x0000.00053e78 of redo dump = on disk scn: 0x0000.00053e78 of controlfile dump.

recovery starts from 'low cache rba' until 'on disk rba'. since all
redo-records are ordered by SCN, no consistency problem occurs.

if we return your question, SCN of last commit is not last SCN in system.
Oracle will automaticly create a redo record to show next redo record in
redolog file. for example, my last commit's SCN is SCN scn:
0x0000.00053e76(see redo record dump above). but, last SCN is
0x0000.00053e78.

I attached redolog and control file dumps.

regards..




Danisment Gazi Unal
Web: http://www.geocities.com/danisment


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Danisment UNAL
  INET: danisment_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Feb 08 2001 - 04:16:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US