那位能告诉这个教本在9i里怎么改一下???

[复制链接]
查看11 | 回复2 | 2011-6-1 15:32:28 | 显示全部楼层 |阅读模式
下面这个脚本在8i里可用,但9i中x$bh里边没有了BUF#这个列,不知道对应那个列,麻烦告诉我!非常感谢!
select 'DEFAULT' "BUFFER_POOL",
DECODE(GREATEST(Class, 10),

10,

DECODE(Class,

1,

'Data',

2,

'Sort',

4,

'Header',

To_CHAR(class)),

'Rollback') Class,
sum(decode(bitand(flag, 1), 1, 0, 1)) notdirty,
sum(decode(bitand(Flag, 1), 1, 1, 0)) Dirty,
SUM(Dirty_Queue) OnDirtyQ,
count(*) Total
from x$bh
where class in (1, 2, 4, 10) and
buf# >= (select lo_bnum

from v$buffer_pool

where name = 'DEFAULT' and buffers > 0) and
buf#0)
group by 'DEFAULT',

DECODE(GREATEST(Class, 10),

10,

DECODE(Class,

1,

'Data',

2,

'Sort',

4,

'Header',

To_char(class)),

'Rollback');

    复制代码
回复

使用道具 举报

千问 | 2011-6-1 15:32:28 | 显示全部楼层
ddd!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行