ITPub博客

首页 > 应用开发 > IT综合 > 再加脚本

再加脚本

原创 IT综合 作者:davies 时间:2007-02-06 16:06:45 0 删除 编辑
再加脚本[@more@]

-- Remark: This is an incomplete procedure.9i and 10g
create or replace procedure DC
as
cursor current_event is
select a.sid, a.seq#, a.event, a.p1text,
a.p1, a.p1raw, a.p2text, a.p2,
a.p2raw, a.p3text, a.p3, a.p3raw,
a.wait_time, a.seconds_in_wait, a.state, b.serial#,
b.username, b.osuser, b.paddr, b.logon_time,
b.process, b.sql_hash_value, b.saddr, b.module,
b.row_wait_obj#, b.row_wait_file#, b.row_wait_block#,
b.row_wait_row#
from v$session_wait a, v$session b
where
--a.sid = b.sid and
b.username is not null
and b.type <> 'BACKGROUND'
and a.event in (
'db file sequential read',
'db file scattered read',
'latch free',
'direct path read',
'direct path write',
'enqueue',
'library cache pin',
'library cache load lock',
'buffer busy waits',
'free buffer waits');

select segment_name, partition_name
from dba_extents
where between block_id and (block_id + blocks - 1)
and file_id = ;

select distinct a.object_name, a.subobject_name
from dba_objects a, sys.x$bh b
where (a.object_id = b.obj or a.data_object_id = b.obj)
and b.file# =
and b.dbablk = ;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/178357/viewspace-897793/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: sysman密码重置
请登录后发表评论 登录
全部评论
  • 博文量
    81
  • 访问量
    507771