dbTalk Databases Forums  

Sql Profiler TextData exec sp_execute <number>

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Sql Profiler TextData exec sp_execute <number> in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MSUser
 
Posts: n/a

Default Sql Profiler TextData exec sp_execute <number> - 03-22-2010 , 10:58 AM






when textData is:

exec sp_execute <number> @xx=2222 @yy=3333

Is there a way to find the sql behind the sp_execute?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Sql Profiler TextData exec sp_execute <number> - 03-22-2010 , 03:54 PM






MSUser (MSUser (AT) discussions (DOT) microsoft.com) writes:
Quote:
when textData is:

exec sp_execute <number> @xx=2222 @yy=3333

Is there a way to find the sql behind the sp_execute?
If there is an "sp_prepare" with the same number in the thread, there is.

If you include sql_handle in the trace, you look can up the text for the
cache entry. Or? No, you probably only get the call to sp_execute. :-(

I don't remember if you see the individual statements if you include
StmtCompleted, but I have a nagging feeling that you don't.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.