Hi,
While running the SQL Profiler trace, I see a lot of delays in the sp_execute command when we ran through a sales order.
Doing a quick search on Google, I found that sp_execute is ran after sp_prepare is done (where the SQL code is). However, searching through the trace log, I don't find any sp_prepare?
Is there an easy way to find out the SQL code for the sp_execute?
0
Comments
You need to start Sql profiler, Create a new template. Base it of the tunning template.
On the Event Selection, right click on Stored Procedure and Select Event Category.
Check RPC:Starting Event
This even will show the preparation of the statement.
It will look something like below.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I turned on the T-SQL in the event view in order to see the SQL script.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
SP:StmtCompleted
SQL:BatchCompleted
<edit>
When I think of it ... they are also included in the default "tuning" template :-k .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog