|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这章描述如何检查和处理在MySQL数据库中的数据损坏。如果你的表损坏很多,你应该尝试找出其原因!见G.1调试一个MySQL服务器。
实在人人对v$bh这个视图大概一向器重不敷.
我们来看一下这个视图次要字段申明:
STATUS
VARCHAR2(1)
Statusofthebuffer:
FREE-notcurrentlyinuseXCUR-exclusiveSCUR-sharedcurrentCR-consistentreadREAD-beingreadfromdiskMREC-inmediarecoverymodeIREC-ininstancerecoverymode?
DIRTY
VARCHAR2(1)
Y-blockmodified
TEMP
VARCHAR2(1)
Y-temporaryblock
PING
VARCHAR2(1)
Y-blockpinged
STALE
VARCHAR2(1)
Y-blockisstale
DIRECT
VARCHAR2(1)
Y-directblock
?
我们注重到v$dirty代表的就是blockmodified
?
假如我们进一步向下追溯:
SQL>selectVIEW_DEFINITIONfromv$fixed_view_definitionwhereVIEW_NAME=GV$BH;
VIEW_DEFINITION
--------------------------------------------------------------------------------
selectbh.inst_id,file#,dbablk,class,decode(state,0,free,1,xcur,2,scur
,3,cr,4,read,5,mrec,6,irec,7,write,8,pi),x_to_null,forced_reads,
forced_writes,bh.le_addr,name,le_class,decode(bitand(flag,1),0,N,Y),d
ecode(bitand(flag,16),0,N,Y),decode(bitand(flag,1536),0,N,Y),dec
ode(bitand(flag,16384),0,N,Y),decode(bitand(flag,65536),0,N,Y),
N,obj,ts#fromx$bhbh,x$lelewherebh.le_addr=le.le_addr(+)
我们能够看到v$bh的底层暗示x$bh
个中v$bh中的dirty/temp/ping/stale/direct五个字段来历于x$bh中的flag字段
格局化一下输入:
SELECTbh.inst_id,file#,dbablk,CLASS,
??????DECODE(state,
??????????????0,free,
??????????????1,xcur,
??????????????2,scur,
??????????????3,cr,
??????????????4,read,
??????????????5,mrec,
??????????????6,irec,
??????????????7,write,
??????????????8,pi
?????????????),
??????x_to_null,forced_reads,forced_writes,bh.le_addr,NAME,le_class,
??????DECODE(BITAND(flag,1),0,N,Y),
??????DECODE(BITAND(flag,16),0,N,Y),
??????DECODE(BITAND(flag,1536),0,N,Y),
??????DECODE(BITAND(flag,16384),0,N,Y),
??????DECODE(BITAND(flag,65536),0,N,Y),N,obj,ts#
?FROMx$bhbh,x$lele
?WHEREbh.le_addr=le.le_addr(+)
由此我们得以窥视x$bh.flag的深层寄义.
支持AIX、FreeBSD、HP-UX、Linux、MacOS、NovellNetware、OpenBSD、OS/2Wrap、Solaris、Windows等多种操作系统 |
|