Oracle Data Dictionary x $ kvit and x $ kcvfh Learning

Source: Internet
Author: User

X $ table is the core part of the database. These tables are used to track internal database information and maintain normal operation of the database. The x $ table is encrypted and is not described in the Oracle documentation. Oracle uses these x $ tables to create a large number of other views to provide users with the ability to query and manage databases.

************************************~ (@ ^ _ ^ @)~ **************************************** **************

X $ kcvfh is the source of V $ datafile_header. V $ datafile_header is believed to be frequently met during Oracle recovery, because it not only contains checkpoint_change #, more importantly, it contains the sequence # Of the logfile where checkpoint_change # is located. To be precise, RBA has RBA, you can know exactly which logfile (archivelog Or redo) is needed during recovery ).

X $ kcvfh has three fields that are very meaningful.

1) fhrba_seq: indicates the log serial number corresponding to the current online log

2) fhrba_bno: indicates the log file block number

3) fhrba_bof: indicates the byte offset

In fact, the three fields fhrba_seq, fhrba_bno, and fhrba_bof correspond to RBA, which means:
Recent entries in the redo thread of an Oracle instance are addressed using a 3-part redo byte address, or RBA. An RBA is comprised:
The log file sequence number (4 bytes)
The log file block number (4 bytes)
The Byte offset into the block at which the redo record starts (2 bytes)
Record the RBA on the datafile header, so that you can know exactly which log file is needed (by the log file sequence number) and which block (by the log file block number) and
Which byte does the log block start reading and restoring (through the byte offset)

sys@ORCL> select hxfil,fhrba_seq,fhrba_bno,fhrba_bof from  x$kcvfh;     HXFIL  FHRBA_SEQ  FHRBA_BNO  FHRBA_BOF---------- ---------- ---------- ----------         1         36          2         16         2         36          2         16         3         36          2         16         4         36          2         16         5         36          2         16

V $ fixed_view_definition indicates that x $ kcvfh is the source of V $ datafile_header.

sys@ORCL> select view_definition from v$fixed_view_definition where view_name='V$DATAFILE_HEADER';VIEW_DEFINITION----------------------------------------------------------------------------------------------------select  FILE# , STATUS , ERROR , FORMAT, RECOVER , FUZZY, CREATION_CHANGE#, CREATION_TIME , TABLESPACE_NAME , TS# , RFILE# , RESETLOGS_CHANGE# , RESETLOGS_TIME , CHECKPOINT_CHANGE# , CHECKPOINT_TIME , CHECKPOINT_COUNT , BYTES , BLOCKS , NAME, SPACE_HEADER, LAST_DEALLOC_SCN from GV$DATAFILE_HEADER where inst_id = USERENV('Instance')sys@ORCL> select view_definition from v$fixed_view_definition where view_name='GV$DATAFILE_HEADER';VIEW_DEFINITION----------------------------------------------------------------------------------------------------select inst_id,hxfil,decode(hxons, 0, 'OFFLINE', 'ONLINE'),decode(hxerr, 0, NULL, 1,'FILE MISSING',2,'OFFLINE NORMAL', 3,'NOT VERIFIED', 4,'FILE NOT FOUND',5,'CANNOT OPEN FILE', 6,'CANNOT READ HEADER', 7,'CORRUPT HEADER',8,'WRONG FILE TYPE', 9,'WRONG DATABASE', 10,'WRONG FILE NUMBER',11,'WRONG FILECREATE', 12,'WRONG FILE CREATE', 16,'DELAYED OPEN',14, 'WRONG RESETLOGS', 15,'OLD CONTROLFILE', 'UNKNOWN ERROR'),hxver,decode(hxnrcv, 0,'NO', 1,'YES', NULL),decode(hxifz, 0,'NO', 1,'YES', NULL),to_number(fhcrs),to_date(fhcrt,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'),fhtnm,fhtsn,fhrfn,to_number(fhrls),to_date(fhrlc,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'),to_number(fhscn),to_date(fhtim,'MM/DD/RR HH24:MI:SS','NLS_CALENDAR=Gregorian'),fhcpc,fhfsz*fhbsz,fhfsz,hxfnm, decode(hxlmdba, 0, NULL, hxlmdba), decode(hxlmld_scn, '0', NULL, hxlmld_scn) from x$kcvfh

**************************************** * {{{ (>_< )}}} \ (^ O ^ )/~ **************************************** **

 

The conditions for triggering dbwn write in the background process include:

1) when the dirty block reaches the threshold

2) When the wood has a free buffer

In x $ kvit, we can see their related settings:

sys@ORCL> select kvittag,kvitval from x$kvit where kvittag in ('kcbldq','kcbfsp');KVITTAG                                                             KVITVAL---------------------------------------------------------------- ----------kcbldq                                                                   25kcbfsp                                                                   40

Threshold: 25%

Free ratio: 40%

 

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.