Click here to Skip to main content
12,894,339 members (84,565 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 25 Aug 2013

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

You may also be interested in...

Comments and Discussions

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