新博客http://www.cnblogs.com/zhjh256 欢迎访问
分类: Oracle
2008-04-15 17:44:30
数据文件活动状况:
SELECT file_name,
phyrds,
phywrts,
decode(phyrds, 0, 0, phyblkrd / phyrds) "Blocks/Read",
decode(phywrts, 0, 0, phyblkwrt / phywrts) "Blocks/Write"
FROM dba_data_files, v$filestat
WHERE dba_data_files.file_id = v$filestat.file#;
会话使用的CPU:
SELECT substr(sn.name, 1, 30) parameter,
ss.username || '(' || se.sid || ')' user_process,
se.value
FROM v$session ss, v$sesstat se, v$statname sn
WHERE se. statistic# = sn.statistic#
AND sn.name LIKE '%CPU used by this session%'
AND se.sid = ss.sid
ORDER BY sn.name, se.value DESC;