How can I set-up SQL Server alert for when table got corrupted?
Recently one of the database tables got corrupted in production's SQL server. I am trying to create an alert for this kind of issue. I don't see exact Error number or severity to choose from while creating alert. How can I foresee or set and Alert in SQL Server for this kind of issue when they happen?
Appreciate your responses.
I https://github.com/erikdarlingdata/DarlingData/blob/main/Alerts/Alerts.sql to set up alerts for high severity and corruption errors.
It assumes a couple things:
- You are using a version and edition of SQL Server that supports database mail
- You have the https://docs.microsoft.com/en-us/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum?view=sql-server-ver15 enabled on databases you care to get alerted about corruption in