rac sga cache_buffer_size "V$BH"

来源:互联网 发布:欧弟老婆开的淘宝店铺 编辑:程序博客网 时间:2024/05/11 05:27

V$BH:This is a Real Application Clusters view. This view gives the status and number of pings for every buffer in the SGA.
--记录了sga缓冲区中的object及其状态

ColumnDatatypeDescriptionFILE#NUMBERDatafile identifier number (to find the filename, queryDBA_DATA_FILES or V$DBFILE)BLOCK#NUMBERBlock numberCLASS#NUMBERClass numberSTATUSVARCHAR2(6)Status of the buffer:
  • free - Not currently in use

  • xcur - Exclusive

  • scur - Shared current

  • cr - Consistent read

  • read - Being read from disk

  • mrec - In media recovery mode

  • irec - In instance recovery mode

XNCNUMBERNumber of PCM x to null lock conversions due to contention with another instance. This column is obsolete and maintained for backward compatibility.LOCK_ELEMENT_ADDRRAW(4 | 8)Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.LOCK_ELEMENT_NAMENUMBERThe address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.LOCK_ELEMENT_CLASSNUMBERThe address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.FORCED_READSNUMBERNumber of times the block had to be reread from the cache because another instance has forced it out of this instance's cache by requesting the lock on the block in exclusive modeFORCED_WRITESNUMBERNumber of times GCS had to write this block to cache because this instance had used the block and another instance had requested the lock on the block in a conflicting modeDIRTYVARCHAR2(1)Y - block modifiedTEMPVARCHAR2(1)Y - temporary blockPINGVARCHAR2(1)Y - block pingedSTALEVARCHAR2(1)Y - block is staleDIRECTVARCHAR2(1)Y - direct blockNEWVARCHAR2(1)Always set to N. This column is obsolete and maintained for backward compatibility.OBJDNUMBERDatabase object number of the block that the buffer representsTS#NUMBERTablespace number of block

SQL>  select sum(BLOCK#),status from v$bh group by status;

SUM(BLOCK#) STATUS
----------- ---------------------
1.0537E+11 xcur
1.1988E+10 cr

SQL> alter system flush buffer_cache;

System altered.

SQL> select sum(BLOCK#),status from v$bh group by status;

SUM(BLOCK#) STATUS
----------- ---------------------
    854666 xcur
1.1735E+11 free

原创粉丝点击