October 29, 2009 at 3:15 pm
How can I see bind variables of an SQL statement.
For example,
create PROCEDURE sample_sp_test
(@param1 int,
@param2 int)
AS
SELECT @param1, @param2
GO
EXEc sample_sp_test 1,4
EXEc sample_sp_test 1,3
EXEc sample_sp_test 1,5
I want to be able to see
instead of :
SELECT @param1, @param2
the actual values
for example:
SELECT 1,4
I can not see it on SQL Server profiler
Note that in this sample I used the parameters on the select section and not in the where clause
but I believe that you understood my problem.
Thanks in advance
Ran
October 29, 2009 at 4:48 pm
You won't see it in Profiler like that. You'd only see
sp_test 1, 4
for a stored procedure call in Profiler.
October 30, 2009 at 5:57 am
so how can I do it ?
October 30, 2009 at 7:57 am
you run profiler, and pick the Stored procedure events. I see it in
SQL: Batchstarting
SP:starting
SQL:BatchCompleted.
November 1, 2009 at 12:55 am
this is not solving my problem because there are scenarios that I can not see the parameters ,
I am searching for a general solution that I believe can not be solved using SQL profiler.
maybe there is speciel Flag in SQL Server that save the bind variables.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply