SQL Server Restart Health Check Script





0/5 (0 vote)
Steps for deploying Restart Health Check script in a SQL Server environment.
Prerequisites
- DB Mail service needs to be deployed or its deployment script should be present.
- Health Check Script does not work on SQL Server 2000
- SQL Server names in a SQL table
- Get SQL instance name -- for example, SQL2008R2\TEST
- Get SQL DB name -- for example, SQLDB
- Get SQL table name -- for example, dbo.health_check_server_list
- PowerShell tool for deployment
- Preferred tool is POWERGUI Script Editor Tool
Steps to install health check script
- Create a folder C:\healthcheck
- Copy attached files into above folder
- Fill out below details in script db_mail_check.sql.
- Profile name
- Email address of the account from which you want to send email out from SQL Server
- Receiving email address
- Mail server address
- Email address where you want to receive alert
- Fill out below details in script health_check_script_SP.sql
- DB mMail profile name
- Email address where you want to receive alert
- Fill out below details in PowerShell script health_check_powershell_deploy_script.ps1
$sql_instance
$db_name
- Open script health_check_powershell_deploy_script.ps1 in PowerGUI script editor
- Execute the script using F5 key.