sqlrx logo
SQLRx® Tip of the Month
 
 
October 2009
Greetings!
 
As a DBA, make sure you monitor the 11 VitalSigns used by SQLRx to debug performance bottlenecks.  In addition to monitoring these items, here's a helpful script to prevent MSDB bloat.
 
SQL 2008SQL Server Administration:  Make sure to keep the system database MSDB maintained.  When DatabaseMail is enabled, it's important to clean up old mail attachments and logs to prevent MSDB bloat.  Here is a script designed to clean up mail attachments and logs more than 5 days old.

 
 
DECLARE
@d DATETIME
SET @d = DATEADD(dd, -5, GETDATE())
EXECUTE msdb.dbo.sysmail_delete_mailitems_sp @sent_before = @d
EXECUTE msdb.dbo.sysmail_delete_log_sp @logged_before = @d 
 
 
If you have a SQL question you'd like us to answer, and possibly use for the next SQLRx Tip of the Month, email it to us!
 
For assistance or more information on optimizing your SQL Server Environment, visit us at www.sqlrx.com or email Lori Brown at lorib@isi85.com.  

Sincerely,

Lori Brown | SQLRx Senior Consultant | Integrated Services, Inc.
4144 N. Central Expwy, Suite 430  |  Dallas, TX  75204
Phone: 214.526.7680 x 113 | lorib@isi85.com 
 
 
Integrated Services, Inc.                                    
2008 winner logo small
Turning Data Into Profit
 
Over 20 Years of Credibility & Trust
 

Join our email list