July 9, 2009 at 6:37 am
Hi,
when i use the sys.sysprocesses DMV to catch the syntax that was issue,i get this syntax with the parameters but not the parameters itself.
from where i can get the full syntax with all the parameters?
THX
example: select sql_text.text from sys.sysprocesses
Cross apply sys.dm_exec_sql_text(sql_handle) sql_text
where spid > 50
(@P1 int,@P2 int,@P3 int,@P4 int,@P5 char(1),@P6 int)update mil.dbo.TRANSORDER set QUANT = convert(int, str( ( mil.dbo.TRANSORDER.QUANT + @P1 ) , 13, 0)) , TQUANT = convert(int, str( ( mil.dbo.TRANSORDER.TQUANT + @P2 ) , 13, 0)) , CURDATE = @P3 / 1440 * 1440 from mil.dbo.TRANSORDER where ( mil.dbo.TRANSORDER.DOC = @P4 ) and ( mil.dbo.TRANSORDER.TYPE = @P5 ) and ( mil.dbo.TRANSORDER.KLINE = @P6 ) and not ( mil.dbo.TRANSORDER.TRANS = 0 )
July 9, 2009 at 6:56 am
Hi,
I may have mis-understood the question, but could you not run a profiler session and then catch the executed code from there?
Jackal
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply