Extended events – fetching api cursors _ official pythian® blog

–SELECT * FROM #XEResults — Query the Event data from the Target. Database record SELECT [event ] . Data recovery certification [ VALUE ] ( ‘(@name)[1]’ , ‘varchar(50)’ ) AS event_name

— , DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), CURRENT_TIMESTAMP), [event].[value](‘(@timestamp)[1]’, ‘datetime2’)) AS [timestamp] , [event ] . Database programs [ VALUE ] ( ‘(action[@name=”session_id”]/value)[1]’ , ‘int’ ) AS [session_id ] , [event ] . Raid 1 data recovery [ VALUE ] ( ‘(action[@name=”database_name”]/value)[1]’ , ‘varchar(128)’ ) AS [database_name ] , [event ] . Database 2016 [ VALUE ] ( ‘(action[@name=”client_app_name”]/value)[1]’ , ‘varchar(500)’ ) AS [client_app_name ] , [event ] . Key value database [ VALUE ] ( ‘(data[@name=”object_name”]/value)[1]’ , ‘varchar(50)’ ) AS [object_name ] , [event ] . Database mirroring [ VALUE ] ( ‘(action[@name=”sql_text”]/value)[1]’ , ‘varchar(max)’ ) AS [sql_text ] , [event ] . Data recovery techniques [ VALUE ] ( ‘(data[@name=”statement”]/value)[1]’ , ‘varchar(1000)’ ) AS [statement ] , [event ] . Data recovery using linux [ VALUE ] ( ‘(action[@name=”attach_activity_id_xfer”]/value)[1]’ , ‘varchar(200)’ ) AS [attach_activity_id_xfer ] , [event ] . Data recovery apple [ VALUE ] ( ‘(action[@name=”attach_activity_id”]/value)[1]’ , ‘varchar(200)’ ) AS [attach_activity_id ] FROM #XEResults

CROSS APPLY [event_data ] . Data recovery google store [nodes ] ( ‘event’ ) AS [q ] ( [event ] ) ORDER BY DATEADD (hh , DATEDIFF (hh , GETUTCDATE ( ) , CURRENT_TIMESTAMP ) , [event ] . Database works [ VALUE ] ( ‘(@timestamp)[1]’ , ‘datetime2’ ) ) , [event ] . Data recovery cheap [ VALUE ] ( ‘(action[@name=”attach_activity_id”]/value)[1]’ , ‘varchar(200)’ );

FROM [sys].[fn_xe_file_target_read_file](N’Track_api_cursor*xel’,NULL,NULL,NULL) ;–SELECT * FROM #XEResults– Query the Event data from the Target.

The cool part with extended events is turning track causality on. Database of state incentives for renewables and efficiency This is going to provide 2 additional actions that can be used to correlate which events are related to each other, and in what order they were fired. Data recovery usb stick When you are capturing multiple sessions, this will help identify all the events related to a specific session (attach_activity_id_xfer) and see the sequence they were fired in (attach_activity_id).


Database companies If we just look at these columns you will see what I’m talking about: event_name

You can see the “attach_activity_id_xfer” column shows the same value, so this is all activity from one session. Database application The first two rows of the table I can see were fired in sequence going by the “attach_activity_id” value. Database online Summary

The main purpose I want you to see is with XE you can simply use 2 events to monitor for the API CURSOR queries. Database high availability You no longer have to deal with the rpc_completed and capture multiple events just to see the one with the actual query. Database utility If you are dealing with a busy system it is going to cut down on the amount of data you are capturing. Data recovery zagreb In the screenshot below you can tell all of those rpc_completed events are not required, just the circled items give me all I need to know:

banner