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.

 All Forums
 Site Related Forums
 Article Discussion
 Article: Testing with Profiler Custom Events and Database Snapshots

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 complex
business logic which may or may not be executed. These procedures make it an absolute
nightmare when it comes to debugging problems because they're so complex and have
so many logic offshoots that it's very easy to get lost when you're trying to determine
the path that the procedure code took when it ran. Fortunately Profiler lets you
define custom events that you can raise in your code and capture in a trace so you
get a better window into the sub events occurring in your code. I found it very
useful to use custom events and a database snapshot to debug some code recently
and we'll explore both in this article. I find raising these events and running
Profiler to be very useful for testing my stored procedures on my own as well as
when my code is going through official testing and user acceptance. It's a simple
approach 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

Posted - 2009-06-22 : 17:50:01
For User Configurable events, also see
http://weblogs.sqlteam.com/mladenp/archive/2008/10/16/Custom-user-configurable-SQL-Server-Profiler-events.aspx



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -