How to Find Sessions Generating Lots of Redo or Archive logs (Doc ID 167492.1)
TO CHECK SESSIONS
SQL> SELECT s.sid, s.serial#, s.username, s.program,
i.block_changes
FROM v$session s, v$sess_io i
WHERE s.sid = i.sid
ORDER BY 5 desc, 1, 2, 3, 4;
TO CHECK TRANSACTIONS
SQL> SELECT s.sid, s.serial#, s.username, s.program,
t.used_ublk, t.used_urec
FROM v$session s, v$transaction t
WHERE s.taddr = t.addr
ORDER BY 5 desc, 6 desc, 1, 2, 3, 4
TO CHECK EXACT QUERY
SELECT address ,SUBSTR(sql_text,1,1000) Text, buffer_gets, executions,
buffer_gets/executions AVG
FROM v$sqlarea a, v$session s
WHERE sid = <SID>
AND s.sql_address = a.address
AND executions > 0
ORDER BY 5;
===============================
No comments:
Post a Comment