Focus of this article is to check the redo log switch frequency as well as the sessions causing huge redo logs generation. A sudden surge in archived log generation can make DBA look into the issue to find out since when redo log generation has spiked. Following is the query we can easily find everywhere on the internet to find out the redo logs switch frequency. Of course this is not written by me. I do not know who is the original writer of this query therefore I can refer to that great guy or website.
SQL> set lines 200 pages 100 |
If you have RAC, you can
use following version of query. Replace THREAD# and INST_ID values to the
instance number for which redo log switches are needed to be found.
SQL> set lines 200 pages 100 |
Finding sessions with huge Redo Log Generation
If you see a sudden spike
in redo log switches or archived log generation, you would probably like to
find out which sessions/process are causing this. Following is the query that
can help you finding out the sessions responsible for huge block change and returns
you the top session that are responsible doing block changes (block changes
cause redo log generation). You can compare the total block changes with
reference to their log on time to analyze the redo log generation from
individual sessions. The culprit session(s) would be the ones doing a lot of
block changes since their log on time. Execute the query frequently (for
example every 10 seconds) to monitor the block changes by suspected sessions to
confirm if they are the real culprit.
SQL> set lines 200 pages 80 |
No comments:
Post a Comment