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 - 2009-06-22 : 16:56:16
|
We've all had them. One of those stored procedures that is huge and contains complexbusiness logic which may or may not be executed. These procedures make it an absolutenightmare when it comes to debugging problems because they're so complex and haveso many logic offshoots that it's very easy to get lost when you're trying to determinethe path that the procedure code took when it ran. Fortunately Profiler lets youdefine custom events that you can raise in your code and capture in a trace so youget a better window into the sub events occurring in your code. I found it veryuseful to use custom events and a database snapshot to debug some code recentlyand we'll explore both in this article. I find raising these events and runningProfiler to be very useful for testing my stored procedures on my own as well aswhen my code is going through official testing and user acceptance. It's a simpleapproach and a great way to catch any performance problems or logic errors.Read Testing with Profiler Custom Events and Database Snapshots |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|