Tuesday, December 24, 2013

A little fun with HierarchyId

I was recently enhancing the DDL trigger that we have implemented on all of our servers. The requirement was to e-mail the team whenever a security related event came up. Here's the trick: how do we alert on just the security events without having to hard code all of them? Here's how I did it.

Thursday, November 21, 2013

VLF Fragmentation Analysis

While doing a little analysis of VLF Fragmentation, I found one database that had some trouble. Specifically, it had CDC enabled and the log reader agent had stopped a while ago. So, in short, the log had been growing unchecked for quite some time. After fixing the underlying problem, I decided to shrink the log. In order to help me find out where in the ring the log was, I came up with a little script.

Monday, October 21, 2013

On software delivery and NASCAR

Sometimes, I come up with what I think are good analogies for the way things work. My latest was about the necessity of being safe in deploying to a production environment. Here goes:

NASCAR is an exciting sport for both the spectators as well as the driver and crew. But, what makes it possible at all are all the safety measures that are in place in the event of catastrophe. I think that the viewership wouldn't be quite as high if every time there was a crash the driver came out of the car with his face melting off. When you're moving at the edge of human reaction times and engineering, things are bound to happen from time to time. It's what you do in reaction to that that is the difference between a sport and grizzly spectacle.

Monday, October 7, 2013

I'm presenting!

I'm a little late in announcing this, but I've been accepted to speak at SQL Saturday 238 this coming Saturday. Come see me at the U!

And, in a shocking turn, I'm also speaking at SQL Saturday 256 in Kalamazoo, MI on Nov 2. Hope to see you there.

Friday, July 19, 2013

A small CDC nugget

In the style of Jim Anchower, it's been a long time since I rapped at ya. Life's been busy, but that's little excuse, eh?

I recently read an article on SQL Server Central here that gives a very decent overview of CDC processing. One thing that I pulled out was an undocumented stored procedure called  sys.sp_cdc_dbsnapshotLSN that will, as the name suggests, give you the LSN of a database snapshot. Pretty useful stuff if you need to re-initialize your warehouse!