November 27, 2006 at 10:30 am
I see following entry in the trace that I am running:
exec sp_execute 6, NULL
what does it mean?
November 27, 2006 at 3:06 pm
Please look at the example below. It will help you read the trace.
declare @P1 int
set @P1=1
exec sp_prepare
@P1 output,
N'@P1 int',
N'SELECT CustName FROM Customers CustID = @P1', 1
select @P1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec sp_execute 1, 125
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec sp_execute 1, 126
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec sp_execute 1, 127
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec sp_unprepare 1
The sp_prepare statement is compiling the SQL statement (i.e. building a query plan) and assigning it handle of 1. Each sp_execute statement is calling that SQL statement and passing it the second value as the parameter @P1. The final statement is unpreparing statement nubmer 1.
November 28, 2006 at 7:28 am
So do you still need help?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply