Home » Listing Details
Top Websites
  1. Dynamics GP Help
    Over 6500 resources listed.
  2. Mark Polino's DynamicAccounting.net
    Over 5100 resources listed.
  3. Rose Business Solutions Blog New
    Over 2200 resources listed.
  4. Developing for Dynamics GP - By David Musgrave and the MS GP Dev Support Team
    Over 1100 resources listed.
  5. Mariano Gomez at The Dynamics GP Blogster
    Over 1000 resources listed.
  6. Microsoft Dynamics Partner Community Blog
    Over 900 resources listed.
  7. Christina Phillips, Steve Endow & Lorren Zemke at Dynamics GP Land
    Over 700 resources listed.
  8. Mohammad Daoud's Dynamics GP Blog
    Over 600 resources listed.
  9. Vaidy Mohan at Dynamics GP - Learn & Discuss
    Over 500 resources listed.
  10. Inside Microsoft Dynamics GP Official Blog
    Over 500 resources listed.
  11. eOne Business Solutions Blog
    Over 400 resources listed.
  12. About Dynamics, Development and Life
    Over 300 resources listed.
  13. Frank Hamelly at GP2theMax
    Over 300 resources listed.
  14. Dynamics CPM
    Over 300 resources listed.
  15. BKD Dynamics GP Insights Blog
    Over 200 resources listed.
  16. Leslie Vail at Dynamics Confessor Blogspot
    Over 200 resources listed.
  17. Victoria Yudin's Dynamics GP Website
    Over 200 resources listed.
    Victoria Yudin
  18. Janakiram M.P. at DynamicsBlogger
    Over 100 resources listed.
  19. VS Tools Forum
    Over 100 resources listed.
    Your Resource for Visual Studio Tools for Dynamics GP
  20. Inside Microsoft Dynamics GP Official Blog
    Over 100 resources listed.
  21. US Dynamics GP Field Team Blog
    Over 100 resources listed.
  22. Catherine Eibner MBS Developer Evangelist
    Over 100 resources listed.
  23. Sivakumar Venkataraman at Interesting Findings & Knowledge Sharing
    Over 100 resources listed.
  24. Dynamics Small Business
    Over 100 resources listed.
  25. Belinda, The GP CSI
    Over 100 resources listed.

Title:Weekly Dynamic: SQL Script to Monitor Transaction Log Backups
We see a surprising number of huge transaction logs in clients who should know better. This commonly happens when transaction logs are not being backed up regularly and the database is running in Full recovery mode. If the log grows large enough, SQL Server can stop working leading to a lot of excitement. Typically, this solved with a properly setup maintenance plan in SQL Server but what if that's not the case? What if the maintenance plan is failing and not providing notifications? Short of regularly monitoring transaction log growth, how can a DBA ensure that logs are being properly truncated?

Thanks to the MSSQLTips site, we've now got this SQL Script designed to show any databases in Full or Bulk-Logged recovery model that have had a full backup without any subsequent transaction log backups.

D.[name] AS [database_name]D.[recovery_model_desc] 
sys.databases D LEFT JOIN 
SELECT BS.[database_name]
MAX(BS.[backup_finish_date]AS [last_log_backup_date] 
FROM msdb.dbo.backupset BS 
WHERE BS.type 'L' 
GROUP BY BS.[database_name] 
ON D.[name] BS1.[database_name]
SELECT BS.[database_name]
MAX(BS.[backup_finish_date]AS [last_data_backup_date] 
FROM msdb.dbo.backupset BS 
WHERE BS.type 'D' 
GROUP BY BS.[database_name] 
ON D.[name] BS2.[database_name]
D.[recovery_model_desc] <> 'SIMPLE'
AND BS1.[last_log_backup_date] IS NULL OR BS1.[last_log_backup_date] BS2.[last_data_backup_date]
ORDER BY D.[name];

This script returns database names and recovery models allowing administrators to dig deeper into the underlying problem. Running this script is much easier than monitoring transaction log growth and it can save a lot of pain and expense by helping keep the size of log files manageable.

More information on this script and similar scripts is available from MSSQLTips.com

Category:SUPPORT (TECHNICAL): Backups
Link Owner:
Date Added:June 17, 2010 08:07:41 PM
Number Hits:7
RatingsAverage rating: (0 votes)

No Reviews Yet.