Click here to Skip to main content
Click here to Skip to main content

Tagged as

SQL Server Restart Health Check Script

, 25 Aug 2013 Ms-RL
Rate this:
Please Sign up or sign in to vote.
Steps for deploying Restart Health Check script in a SQL Server environment.


  1. DB Mail service needs to be deployed or its deployment script should be present.
  2. Health Check Script does not work on SQL Server 2000
  3. SQL Server names in a SQL table
    1. Get SQL instance name -- for example, SQL2008R2\TEST
    2. Get SQL DB name -- for example, SQLDB
    3. Get SQL table name -- for example, dbo.health_check_server_list
  4. PowerShell tool  for deployment
    1. Preferred tool is POWERGUI Script Editor Tool

Steps to install health check script

  1. Create a folder C:\healthcheck
  2. Copy attached files into above folder
  3. Fill out below details in script db_mail_check.sql.
    1. Profile name
    2. Email address of the account from which you want to send email out from SQL Server
    3. Receiving email address
    4. Mail server address
    5. Email address where you want to receive alert
  4. Fill out below details in script health_check_script_SP.sql
    1. DB mMail profile name
    2. Email address where you want to receive alert
  5. Fill out below details in PowerShell script health_check_powershell_deploy_script.ps1
    1. $sql_instance
    2. $db_name
  6. Open script health_check_powershell_deploy_script.ps1 in PowerGUI script editor
  7. Execute the script using F5 key.


This article, along with any associated source code and files, is licensed under Microsoft Reciprocal License


About the Author


United States United States
No Biography provided

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150327.1 | Last Updated 25 Aug 2013
Article Copyright 2013 by Atul_Kapoor
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid