Technical Article

Daily Sql Server Health Check

,

Are you a Senior Sql Server DBA or novice looking for a Daily Sql Server Health Check?   As a Senior DBA for over 15 years I have compile a few scripts I use on a daily basis to check the health of my Sql Servers.

Perform a Daily Sql Server Health Check on your Sql Server 2012 version and above.

The scripts will create the following tables and items.

SCRIPT 1: Step1_Daily_Sql_Health_Check_Create

  1. Verify your Sql Server services and agents are running
  2. Check which Databases are online and offline
  3. Check Always-on High Availability AG Health
  4. Verify the current day Database Backups
  5. Check Sql Server Jobs
  6. Check the current Sql Server Login Count
  7. Check the current Sql server databases Read & Write
  8. Check the Sql Server Luns free space

SCRIPT 2: Step2_Daily_Sql_Health_Check_Insert

  1. Insert the current day health check records into the health check tables. You can run this job manually or add the script to a Sql jobs.
  2. The script also deletes records that are older than 14 days. You can change the number of days to delete.

SCRIPT 3: Step3_Daily_Sql_Health_Check_Job (Optional)

  1. Create a Sql Server job that execute script 2.

SCRIPT 4: Step4_QUERY_DAILY_HEALTH_CHECK_TABLES

  1. Run select statements to view the daily Sql server health check records.

Click the link below to download the scripts from my github page.

https://github.com/rogersdba/SQL-SERVER-DAILY-HEALTH-CHECK

  

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating