Tutorials to .com

tybuffer

Print View , by: iSee ,Total views: 10 ,Word Count: 422 ,Date: Tue, 25 Aug 2009 Time: 10:07 PM

ty buffer

In fact, everyone v $ bh to this view may have been getting short shrift.

We look at this view, the main field Description:


STATUS

VARCHAR2 (1)

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?


DIRTY

VARCHAR2 (1)

Y - block modified

TEMP

VARCHAR2 (1)

Y - temporary block

PING

VARCHAR2 (1)

Y - block pinged

STALE

VARCHAR2 (1)

Y - block is stale

DIRECT

VARCHAR2 (1)

Y - direct block


?

We note that v $ dirty representative is block modified

?

If we look further down the back:

SQL> select VIEW_DEFINITION from v $ fixed_view_definition where VIEW_NAME = GV $ BH;

VIEW_DEFINITION
-------------------------------------------------- ------------------------------
select bh.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 # from x $ bh bh, x $ le le where bh.le_addr = le.le_addr (+)


V $ bh, we can see the bottom of said x $ bh

Where v $ bh in the dirty / temp / ping / stale / direct 5 fields from x $ bh in the flag field in

About the output format:

SELECT bh.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 #
? FROM x $ bh bh, x $ le le
? WHERE bh.le_addr = le.le_addr (+)


Thus we were able to spy on x $ bh.flag the deeper meaning.


Microsoft SQL Server Tutorial Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.