0

Finding the failed queries in Azure SQL Description: How can I get all the failed queries in Azure SQL for the last 5 days? Use-case- I need to troubleshoot certain issues

1 Answer 1

0

You need to use Extended Events to capture all T-SQL instructions failing. Use the sqlserver.error_reported event as shown below:

CREATE EVENT SESSION azure_monitor ON DATABASE ADD EVENT sqlserver.error_reported( ACTION (sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.session_id, sqlserver.sql_text, sqlserver.username)) 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.