- Copy the logsqlalert.ps1 Powershell Script to a common Powershell folder like [C:\PSScripts]
- Edit SQL Script 1_Create_SQL_Job_to_Call_the_Powershell_Script.sql, and change the [@notify_email_operator_name] to be your SQL Server Agent Operator
- Create a new SQL agent Job using the TSQL Script 1_Create_SQL_Job_to_Call_the_Powershell_Script.sql
- Enable SQL Agent Tokens either manually in SSMS or using the script 2_SQL_Agent_Turn_Tokens_On.sql, then restart the Agent
- Edit each Agent Alert that you want to send to the Central Database and set the Response to call the SQL Agent Job _SQL_Alerts_Call_Powershell
- Test the System by creating an Alert for 18456 (Login Error) and trying a bad password in SSMS in SQL Auth mode (SA/something)
- The Alert row should show up in the AgentAlerts table on your central server Database
2_OnEachSQLServer
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||