How to Find Sessions Generating Lots of Redo or Archive logs
假如需要我們排查哪個會話產生大量redo的時候,通常有以下兩種做法。由於一個事物產生undo的時候同時也產生redo因此該種做法也適合排查undo的使用情況。
The methods are:
1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates how much blocks have been changed by the session.
High values indicate a session generating lots of redo.
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.sidORDER BY 5 desc, 1, 2, 3, 4;
注:該種方法需要執行多次,透過對block_changes的值進行前後對比,來判斷哪個會話產生大量的redo.
2)Query V$TRANSACTION. This view contains information about the amount of undo blocks and undo records accessed by the transaction (as found in the USED_UBLK and USED_UREC columns).
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;
注:透過多次執行該語句,觀察每次執行時的used_ublk,used_urec的詳細情況,可以從中發現哪個session產生大量的redo和undo.
當你第一次分析一個程式(多個事物)佔用多大的redo或undo時,這樣的情況第二種方式較適合。
The methods are:
1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates how much blocks have been changed by the session.
High values indicate a session generating lots of redo.
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.sidORDER BY 5 desc, 1, 2, 3, 4;
注:該種方法需要執行多次,透過對block_changes的值進行前後對比,來判斷哪個會話產生大量的redo.
2)Query V$TRANSACTION. This view contains information about the amount of undo blocks and undo records accessed by the transaction (as found in the USED_UBLK and USED_UREC columns).
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;
注:透過多次執行該語句,觀察每次執行時的used_ublk,used_urec的詳細情況,可以從中發現哪個session產生大量的redo和undo.
當你第一次分析一個程式(多個事物)佔用多大的redo或undo時,這樣的情況第二種方式較適合。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29446986/viewspace-1329618/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQL: How to Find Sessions Generating Lots of Redo or Archive logsSQLSessionHive
- SQL: How to Find Sessions Generating Lots of Redo or Archive logs-167492.1SQLSessionHive
- How To Maintain and/or Add Redo Logs [ID 602066.1]AI
- How to get complete sessions informationSessionORM
- How to find dependency
- 【操作】調整Online Redo Logs大小(Resizing Oracle Online Redo Logs)Oracle
- How Logs Work On MySQL With InnoDB TablesMySql
- How To Automate Disconnection of Idle SessionsSession
- How to Find Out How Much Space an Index is UsingIndex
- How to find Current open Cursors in OracleOracle
- Usage, Benefits and Limitations of Standby Redo Logs (SRL) [ID 219344.1]MIT
- How to find Master Node in Oracle RAC(zt)ASTOracle
- How to find the UDID for an iPhone/iPod touchiPhone
- How To Using Flashback Data Archive (Oracle Total Recall)HiveOracle
- Master Note: Overview of Redo Logs and Archiving_1503091.1ASTView
- How does SAP freelancer find a project that is not tough?Project
- How do you find that an operation mode switch occurred?
- Archive Log模式下Redo Log、Check Point和Switch LogHive模式
- logminer工具對redo log或archive log的挖掘Hive
- restore archive logs toalternative location they already reside on disk_399894.1RESTHiveIDE
- Archived Redo Logs歸檔重做日誌介紹及其優點Hive
- 使用LOGMNR工具分析Oracle Redo Log和Archive Log教程Oracle RedoHive
- Master Note: Troubleshooting Redo Logs and Archiving (文件 ID 1507157.1)AST
- How to config (no)archivelog mode and manage archive log files by RMANHive
- Oracle OCP 1Z0-053 Q291(encrypted tablespace&redo logs)Oracle
- archive log檔案大小與redo log檔案大小關係探究Hive
- How to 計算當前redo日誌的使用率
- How To Handle MLOG$_AP_SUPPLIER_SITES_AL, MLOG$_AP_SUPPLIERS Growing So Much? Having Lots of Data
- Kill SessionsSession
- How to Find which Session is Holding a Particular Library Cache LockSession
- How to Add/Drop/Resize Redo Log with Physical Standby in place. [ID 473442.1]
- SESSIONS, PROCESSES, TRANSACTIONSSession
- Sessions & Processes parameterSession
- limit active sessionsMITSession
- Error generating final archive: Debug certificate expired on XXXX 時間的解決辦法ErrorHive
- Generating Pods project failedProjectAI
- goldengate 捕捉oracle archive redo log 生成自有格式的trail檔案的大小記錄GoOracleHiveAI
- oracle9i(9204)dg(data guard)_adding and dropping online redo logs_物理_physicalOracle