Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: May 2012

SQL Server – DDL vs. DML Triggers

Although, DML and DDL triggers are used for different purposes, there are some similarities and differences between these.

 

Similarities between DDL and DML triggers:

1. Both are created using similar T-SQL syntax

2. Both can run .NET code

3. You can create multiple DDL and/or DML triggers on an… Read more

1 comments, 733 reads

Posted in SQL and Me on 28 May 2012

SQL Server – Check SQL Agent Job History using T-SQL

To check SQL Server Agent Job History you can use the Log File Viewer from SQL Server Management Studio.

To Open Log File Viewer,

1. Expand Server Node > 2. Expand SQL Server Agent > 3. Expand Jobs > 4. Right click on the Job and 5. Select "View History"… Read more

5 comments, 1,544 reads

Posted in SQL and Me on 14 May 2012

SQL Server – Purging Database Mail History

SQL Server stores all mails and attachments in msdb database. To avoid unnecessary growth of msdb database you should remove these mail history unless it is required for auditing or other purposes.

To check all mails processed by Database Mail, you can use sysmail_allitems catalog view:

SELECT      COUNT(*) Read more

2 comments, 495 reads

Posted in SQL and Me on 10 May 2012