SQL Server 2012 Daily Health Check

Being a DBA, it is good to have some kind of automated health check report that gets delivered to inbox with quick glance of DB health. Hence this script will be very useful. Copy this script and schedule as a SQL agent job. Provide the mail profile and recipient addresses. The script was built with help from several colleagues and references from different SQL forums.

Continue reading to view and copy the script. Since the script is too long, it could not be posted in homepage.
Continue reading “SQL Server 2012 Daily Health Check”

Quick queries to Troubleshoot Database Mail in SQL Server

Use below queries one by one and hopefully, you will be able to find and fix your Database Mail issue.

  1. sysmail_help_queue_sp @queue_type = ‘Mail’
  2. select * from sysmail_event_log
  3. select * from sysmail_allitems
  4. select is_broker_enabled from sys.databases where name=’msdb’
  5. sysmail_help_status_sp
  6. sysmail_start_sp