Skip to content Skip to sidebar Skip to footer

Extended Event Session On SQL Server 2014 To Capture Stored Procedure Calls And Arguments Passed

I have an application which generates certain reports while values are entered and generate button is clicked on an application. I know to which database this application is connec

Solution 1:

below is the way to capture stored proc details using extended events

1.Go to management ->Extended Events --> sessions-->Right click and say new session wizard and give a new session name

enter image description here

2.In choose template field,dont choose default template and click next..

enter image description here

3.In next screen you will be presented with below screen,search for batch and select sql batch started and completed events as shown in screenshot.. and click next

Note: Extended events so much info ,if you change the channel to debug,you will be presented with many more events like spill to tempdb,cpu..

enter image description here

4.Next screen presents you with options to choose fields of interest,here I choose text,connection id,client name..

enter image description here

5.in the next screen ,select flters based on your choice,i choose databasename ,you can choose batch text as well for a single proc enter image description here

6.In this screen,you have the options to choose option of storing data,i choose opion1 since ,I may need data sets collected for long period of time. enter image description here

7.final screen shows you summary and gives you an option to script out what you have done so far .And also start the event session check box in finalscreen as shown in screen below

enter image description here

Now I ran my stored proc in ssms and when finally when I want to see data,i stopped event session .

through File ->new >merge extended events option ,I have the option to choose multiple data sets and it will be shown llike below

enter image description here

I can see my stored proc and fields of interest as highlighted..

enter image description here


Post a Comment for "Extended Event Session On SQL Server 2014 To Capture Stored Procedure Calls And Arguments Passed"