SQL: How to Find Sessions Generating Lots of Redo or Archive logs-167492.1
SQL: How to Find Sessions Generating Lots of Redo or Archive logs (文件 ID 167492.1)
goal: How to find sessions generating lots of redo
fact: Oracle Server - Enterprise Edition 8
fact: Oracle Server - Enterprise Edition 9
fact: Oracle Server - Enterprise Edition 10
fix:
To find sessions generating lots of redo, you can use either of the following
methods. Both methods examine the amount of undo generated. When a transaction
generates undo, it will automatically generate redo as well.
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.
The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program,
2 i.block_changes
3 FROM v$session s, v$sess_io i
4 WHERE s.sid = i.sid
5 ORDER BY 5 desc, 1, 2, 3, 4;
Run the query multiple times and examine the delta between each occurrence
of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
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).
The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program,
2 t.used_ublk, t.used_urec
3 FROM v$session s, v$transaction t
4 WHERE s.taddr = t.addr
5 ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
Run the query multiple times and examine the delta between each occurrence
of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by
the session.
You use the first query when you need to check for programs generating lots of
redo when these programs activate more than one transaction. The latter query
can be used to find out which particular transactions are generating redo.
fix:
To find sessions generating lots of redo, you can use either of the following
methods. Both methods examine the amount of undo generated. When a transaction
generates undo, it will automatically generate redo as well.
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.
The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program,
2 i.block_changes
3 FROM v$session s, v$sess_io i
4 WHERE s.sid = i.sid
5 ORDER BY 5 desc, 1, 2, 3, 4;
Run the query multiple times and examine the delta between each occurrence
of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
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).
The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program,
2 t.used_ublk, t.used_urec
3 FROM v$session s, v$transaction t
4 WHERE s.taddr = t.addr
5 ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
Run the query multiple times and examine the delta between each occurrence
of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by
the session.
You use the first query when you need to check for programs generating lots of
redo when these programs activate more than one transaction. The latter query
can be used to find out which particular transactions are generating redo.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1062282/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQL: How to Find Sessions Generating Lots of Redo or Archive logsSQLSessionHive
- How to Find Sessions Generating Lots of Redo or Archive logsSessionHive
- How to get complete sessions informationSessionORM
- How to find dependency
- 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
- 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
- 【REDO】Oracle redo advice-sqlOracle RedoSQL
- 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
- 使用LOGMNR工具分析Oracle Redo Log和Archive Log教程Oracle RedoHive
- How to config (no)archivelog mode and manage archive log files by RMANHive
- archive log檔案大小與redo log檔案大小關係探究Hive
- How To Maintain and/or Add Redo Logs [ID 602066.1]AI
- 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]
- HOWTO--Generating SQL trace files(Including 10g)SQL
- How to use hints in Oracle sql for performanceOracleSQLORM
- SESSIONS, PROCESSES, TRANSACTIONSSession
- Sessions & Processes parameterSession
- limit active sessionsMITSession
- Error generating final archive: Debug certificate expired on XXXX 時間的解決辦法ErrorHive
- How to Perform SQL Server Log ShippingORMSQLServer
- How to use sql result stored on shell variable?SQL
- dedecms /include/helpers/archive.helper.php SQL Injection VulHivePHPSQL
- Generating Pods project failedProjectAI
- goldengate 捕捉oracle archive redo log 生成自有格式的trail檔案的大小記錄GoOracleHiveAI
- How to prevent blocking in your SQL Server databaseBloCSQLServerDatabase
- Quoted- How Bulk Binds in PL/SQL Boost PerformanceSQLORM
- How To Find The Object That Causing ORA-600 [kqlnrc_1] (文件 ID 1190673.1)Object