log search query alerts specifically for SQL exceptions

AnuragSingh-MSFT 21,386 Reputation points
2024-06-27T16:48:26.95+00:00

How to setup Azure Monitor log-based alert rule to alert for SQL exceptions (or any other exceptions)?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,331 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 21,800 Reputation points
    2024-06-27T17:11:52.3833333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    I'd use TRY ... CATCH and monitor logs generated in CATCH statement

    https://learn.microsoft.com/en-us/sql/t-sql/language-elements/try-catch-transact-sql?view=sql-server-ver16

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.