Get-DbaCustomError
Garry Bargsley (@gbargsley), blog.garrybargsley.com
Get-DbaCustomError View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS Synopsis Retrieves user-defined error messages from SQL Server instances for auditing and documentation. Description Retrieves all custom error messages that have been added to SQL Server using sp_addmessage or through SQL Server Management Studio. These user-defined error messages are stored in the sys.messages system catalog and are commonly used by applications for business logic validation and custom error handling. This function helps DBAs inventory custom errors across multiple instances during migrations, troubleshooting, or compliance audits.
Read more
dbatools