Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-09-13 : 06:29:58
|
Sebastian writes "Hello,Does anybody know how can I see 'Print' statements in my Stored Procedure when using SQL Profiler? Is there any particular event I need to add?If this is not possible at all, what is the simplest way of debugging code with SQL Profiler?ThanksSebastian" |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-09-13 : 10:46:00
|
You'll see any statements in the profiler as long as you are tracing one of the TSQL batch or statement events. If you mean that you want to see print output in SQL Profiler, then no, I am not aware that you cvan do that, SQL Profiler isn't intended to do that. Run your code in Query Analyzer and you'll see all the print output. Also use Query Analyzer for debugging, SQL Profiler isn't a debugger, it's a trace tool.Having said that, you can add your own custom events by using user configurable events and tracing them in SQL Profiler. For example if you add the UserConfigurable:0 event in Profiler, you can add an event inside any stored procedure with a call like this (note that user configurable event is event ID 83, user 1 is 84 and so on).exec sp_trace_generateevent 83, N'this is my event' |
 |
|
|
|
|