-
Notifications
You must be signed in to change notification settings - Fork 62
/
ash_bbw.sql
51 lines (44 loc) · 1.92 KB
/
ash_bbw.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
set linesize 120
/*
when block type is not found in v$waitclass then it's undo/rbs segement
OBJN OTYPE FILEN BLOCKN SQL_ID BLOCK_TYPE
------------------------- ----------- ------ ------------- ------------------
53218 BBW_INDEX_VAL_I INDEX 1 64826 97dgthz60u28d data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 gypmcfzruu249 data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 2vd1w5kgnfa5n data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 3p3qncvp2juxs data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 6avm49ys4k7t6 data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 1hsb81ypyrfs5 data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64652 2vd1w5kgnfa5n data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 3p3qncvp2juxs data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64923 5wqps1quuxqr4 data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 6avm49ys4k7t6 data block 1
-1 0 0 fm7zcsnd5fud6 39
-1 0 0 3qrw5v6d6qj4a 39
53218 BBW_INDEX_VAL_I INDEX 1 64825 2vd1w5kgnfa5n segment header 4
53218 BBW_INDEX_VAL_I INDEX 1 64826 gypmcfzruu249 data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 5x0fksgfwkn6s data block 1
53218 BBW_INDEX_VAL_I INDEX 1 64826 2vd1w5kgnfa5n data block 1
*/
col block_type for a18
col objn for a25
col otype for a15
select
--ash.p1,
--ash.p2,
--ash.p3,
CURRENT_OBJ#||' '||o.object_name objn,
o.object_type otype,
CURRENT_FILE# filen,
CURRENT_BLOCK# blockn,
ash.SQL_ID,
w.class ||' '||to_char(ash.p3) block_type
from v$active_session_history ash,
( select rownum class#, class from v$waitstat ) w,
all_objects o
where event='buffer busy waits'
and w.class#(+)=ash.p3
and o.object_id (+)= ash.CURRENT_OBJ#
--and w.class# > 18
Order by sample_time
/