Thor Logo dbatools

Alert

Get-DbaAgentAlert

Klaas Vandenberghe (@PowerDBAKlaas)

Get-DbaAgentAlert View Source Klaas Vandenberghe (@PowerDBAKlaas) Windows, Linux, macOS Synopsis Retrieves SQL Server Agent alert configurations from one or more instances Description Retrieves alert configurations from SQL Server Agent, including alert names, types, severity levels, message IDs, and notification settings. Use this to audit alert configurations across multiple servers, troubleshoot missing or misconfigured alerts, or gather information for compliance reporting. The function returns detailed alert properties like enabled status, last occurrence dates, and response delays, making it essential for monitoring your alerting infrastructure and ensuring critical system events are properly configured for notification.

Read more

Get-DbaAgentAlertCategory

Patrick Flynn (@sqllensman)

Get-DbaAgentAlertCategory View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Retrieves SQL Server Agent alert categories and their associated alert counts Description Retrieves all SQL Server Agent alert categories from the target instances, showing how alerts are organized and grouped. Categories help DBAs manage alerts logically by grouping related notifications (such as severity-based alerts, database maintenance alerts, or custom business alerts). The function also returns a count of how many alerts are currently assigned to each category, making it useful for understanding your alerting structure and identifying unused or heavily-used categories.

Read more

Install-DbaAgentAdminAlert

Chrissy LeMaire (@cl), netnerds.net

Install-DbaAgentAdminAlert View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates standard SQL Server Agent alerts for critical system errors and disk I/O failures Description Creates a predefined set of SQL Server Agent alerts that monitor for critical system errors (severity levels 17-25) and disk I/O corruption errors (messages 823-825). These alerts catch serious issues like hardware failures, database corruption, insufficient resources, and fatal system errors that require immediate DBA attention.

Read more

New-DbaAgentAlert

Chrissy LeMaire (@cl), netnerds.net

New-DbaAgentAlert View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates SQL Server Agent alerts for automated monitoring and notification of errors, performance conditions, or system events Description Creates new SQL Server Agent alerts that monitor for specific error severities, message IDs, performance conditions, or WMI events. Alerts can automatically notify operators via email, pager, or net send when triggered, and optionally execute jobs in response to the monitored condition.

Read more

New-DbaAgentAlertCategory

Patrick Flynn (@sqllensman)

New-DbaAgentAlertCategory View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Creates new SQL Agent alert categories for organizing and managing database alerts. Description Creates custom alert categories in SQL Server Agent to help organize and group related alerts for better management and monitoring. Alert categories allow DBAs to logically group alerts by function, severity, or responsibility, making it easier to assign different categories to different teams or escalation procedures.

Read more

Remove-DbaAgentAlert

Mikey Bronowski (@MikeyBronowski), bronowski.it

Remove-DbaAgentAlert View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes SQL Server Agent alerts from specified instances. Description Deletes SQL Server Agent alerts that monitor for specific errors, performance conditions, or system events. Useful for cleaning up obsolete alerts, removing test configurations, or managing alert policies across multiple instances. Can remove specific alerts by name, exclude certain alerts, or work with piped input from Get-DbaAgentAlert for selective removal.

Read more

Remove-DbaAgentAlertCategory

Patrick Flynn (@sqllensman)

Remove-DbaAgentAlertCategory View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Removes SQL Server Agent alert categories from SQL Server instances. Description Removes custom alert categories from SQL Server Agent, useful for cleaning up unused organizational structures or standardizing alert management across environments. Any existing alerts that reference the removed category will automatically be reassigned to the [Uncategorized] category, so you don’t need to manually update alert assignments before removal.

Read more

Set-DbaAgentAlert

Garry Bargsley (@gbargsley), garrybargsley.com

Set-DbaAgentAlert View Source Garry Bargsley (@gbargsley), garrybargsley.com Windows, Linux, macOS Synopsis Modifies properties of existing SQL Agent alerts including enabled status and name. Description Modifies existing SQL Agent alerts on one or more SQL Server instances, allowing you to enable, disable, or rename alerts without using SQL Server Management Studio. This function is particularly useful for bulk operations across multiple servers, standardizing alert configurations between environments, or temporarily disabling noisy alerts during maintenance windows.

Read more