Join | Login | Why Join?   
SQL Server, Oracle, DB2, Sybase, MySQL Help - SSWUG.ORG HACKER SAFE certified sites prevent over 99.9% of hacker crime.
Search SSWUG:   
 
Access to 456 free guest articles, discussions and more, just create your free SSWUG User ID:
Email address:  
This will be your login ID - we'll email you your password - you'll even receive the newsletter, opt-out at any time.
Email to Friend //  Discuss Article //  Rate Article //  Digg Article //  Add to Del.icio.us //  Add to Technorati

 

Finding the log hog

Available for Members. This is an off-site link.  Please review our Terms of Service (bottom of page) for additional information.  See Related Articles


 Article Abstract:

(Chris Eaton) Here is another log related monitor script. In this case we are looking for the oldest transaction that is holding log space. The amount of active log space used is determined by the oldest uncommitted transaction.

For example, if a transaction is uncommitted and it's log records are sitting in log number 5823 then DB2 will not remove that log file from the active log path until that transaction commits. If you have only enough space in your log directory for 50 log files then by the time you fill up log file 5873, if that oldest transaction has not committed, then you will have filled up your active log path and transactions will fail due to insufficient log space.

There are of course solutions to this problem like specifying infinite logging and/or specifying the num_log_span database configuration parameter (which indicates the number of log files a single transaction is allowed to span before that transaction is rolled back), or the max_log database parameter (which indicates the percentage of active log that any one transaction can use up before it is rolled back). But if you find you are using up too much active log (from my previous posting) then you can use this query to find out what user and application is holding up the tail of the active log. If this application were to commit, there would potentially be some log space freed up for other transactions to use.

If this transaction has been idle for some time then perhaps the person running the application has updated some rows but has stepped out for a coffee without committing their transaction.

 Read this article...

 Related Articles - For Members.
Transactions and Locks in SQL Server
Heavy Duty LiteSpeed Log Shipping Part 1
Transactional Meditation: T-SQL Commitment Conrol
Heavy Duty LiteSpeed Log Shipping Part 4
Locking in Microsoft SQL Server
Troubleshooting SQL Server Log Shipping
Transaction Isolation Level (SQL Server 6.5/7.0)
Heavy Duty LiteSpeed Log Shipping Part 3
XPDTC.DLL - DTC transaction information



Key (Please note):
(R) - registration may be required for access at the target site
($) - target site may require paid membership for access to this or other content


No Comments/Feedback Posted Yet. Post Your Comments/Feedback

Email to Friend //  Discuss Article //  Rate Article //  Digg Article //  Add to Del.icio.us //  Add to Technorati

   




 

[ Register ] [ Webcasts ] [ Podcasts ] [ Newsletter Archive ] [ RSS/Feeds ]
[ About ] [ Advertise ] [ Contact ] [ Privacy ] [ Terms of Service ]
[ Link to SSWUG ] [ List Server Archives ] [ Recent Orig. Content ]
(c) 1997-2008, Bits on the Wire, Inc.  (0)

Some names and products covered by SSWUG are the registered trademarks of their respective owners.
DAA10354WWW004