Azure sql diagnostic Setting for timeout error

sakuraime 2,341 Reputation points
2021-05-27T06:12:33.523+00:00

Are there any one has some example of which of the following SQL diagnostic event can check the query timeout/ and connection timeout ??

100037-image.png

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2021-06-02T23:59:32.13+00:00

    Maybe is not what you are looking for, but I prefer using extended events for this purpose:

    CREATE EVENT SESSION ssEventoTimeout  
     ON DATABASE  
     ADD EVENT sqlserver.sql_batch_completed (  
     ACTION  (sqlserver.client_app_name,sqlserver.client_connection_id,sqlserver.client_hostname,sqlserver.client_pid,sqlserver.database_id,sqlserver.database_name,sqlserver.session_id,sqlserver.sql_text,sqlserver.username)  
     WHERE ([result] <> (0)))  
     ADD TARGET package0.asynchronous_file_target(  
     SET filename='https://azureblobcontainer.blob.core.windows.net/xe-container/DemoPersistedTimeout.xel')  
    

    You can find more information about them here and here.


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.