Featured Article: Testing with Profiler Custom Events and Database Snapshots
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.
22 June 2009 -
Mike Femenella -
1 Comment
Recent Articles
In the previous article we learned about SQL Server 2008 Extended Events terminology, components and
took a look at a simple example. In this article we'll take a deeper look with some more complex examples.
25 May 2009 -
Mladen Prajdić -
0 Comments
SQL Server 2008 Extended Events are the new low level, high performance eventing system in SQL Server. They use less system resources and provide better tracking of SQL Server performance than previous methods like Perfmon and SQL Trace/Profiler events.
19 May 2009 -
Mladen Prajdić -
0 Comments
This article introduces the reader to Powershell. The application that it demonstrates is one that monitors SQL Server Agent to make sure it is running.
24 March 2009 -
Mike Femenella -
1 Comment
I'm continually trying to track down what service packs are installed on various SQL Servers I support. I can never find the right support page on Microsoft's site. So here's an article with all the SQL Server version information I can track down. If you know of any older versions or can help me fill out any missing data, please post in the comments and I'll update the article.
29 January 2009 -
Bill Graziano -
22 Comments
In my previous article Scheduling Jobs in SQL Server Express we saw how to
make simple job scheduling in SQL Server 2005 Express work. We limited the scheduling to one time or daily repeats. Sometimes this isn't enough.
In this article we'll take a look at how to make a scheduling solution based on Service Broker worthy of the SQL Server Agent itself.
1 December 2008 -
Mladen Prajdić -
17 Comments
As we all know SQL Server 2005 Express is a very powerful free edition of SQL Server 2005. However it does not contain SQL Server Agent service. Because of this scheduling jobs is not possible. So if we want to do this we have to install a free or commercial 3rd party product. This usually isn't allowed due to the security policies of many hosting companies and thus presents a problem. Maybe we want to schedule daily backups, database reindexing, statistics updating, etc. This is why I wanted to have a solution based only on SQL Server 2005 Express and not dependent on the hosting company. And of course there is one based on our old friend the Service Broker.
27 August 2008 -
Mladen Prajdić -
14 Comments
Cascading Updates and Deletes, introduced with SQL Server 2000, were such an important, crucial feature that it is hard to imagine providing referential integrity without them. One of the new features in SQL Server 2005 that hasn't gotten a lot of press from what I've read is the new options for the ON DELETE and ON UPDATE clauses: SET NULL and SET DEFAULT. Let's take a look!
12 August 2008 -
Jeff Smith -
2 Comments
I'm conducting a survey of the readers on the site. If you have a few moments I'd appreciate it if you could fill it out. It's only nine questions and will take just a few minutes. I'm trying to learn more about what topics are interesting to SQLTeam readers.
6 August 2008 -
Bill Graziano -
0 Comments