Looking for a stored procedure to monitor size of Transaction Log file
Is there any way I can create a stored procedure which will check for the Transaction Log file size - where we have a specified limit to grow - and if the Log file reached 80 percent of total size, email alerts can be sent to DBAs?

Software/Hardware used:
ASKED: April 18, 2008  1:11 PM
UPDATED: April 18, 2008  6:23 PM

Answer Wiki:
Yes you can monitor this by looking at the size column in the sysfiles table (SQL 7/2000) or the sys.database_files DMV (SQL 2005+). This column is in pages, so take this number and multiply by 8 to get the file size in Kb. Then divide by 1024 to get Megs. Then if the value is over the preset value use xp_Sendmail of sp_send_dbmail to email the alert.
Last Wiki Answer Submitted:  April 18, 2008  6:23 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,520 pts.