Remove Rogue Large Transactions From Replication
Produced: 27/07/2014 17:40:00
Yesterday I had an issue in which someone had accidentally run a tidy up script on a transactionally replicated table without considering the consequences this would have on replication.

Effectively what they had done was delete 2.5 million records in one transaction which amounted to around 5GB of data changes heading into the replication network. Not good.

Replication Verbose Logging
Produced: 20/07/2014 17:22:00
I’ve had numerous occasions in which I see something going wrong with replication, but rarely are the error messages clear and, to be honest, most of these messages simply specify something along the line of “enable verbose logging”.

This exact situation happened recently in which replication inexplicably decided that working was for suckers and it simply wasn’t going to bother… again only informing me that “verbose logging” was required.

Obtain Start of Day from current_timestamp
Produced: 13/07/2014 17:07:00
This is genuinely one of the things I’m most asked, and by all manner of people from DBAs to Devs because it’s never as simple as it looks and that is how to obtain the start of day from a current_timestamp (or any other datetime value).

Deadlock Alerts via Email
Produced: 06/07/2014 11:36:00
In the second episode of Sheldon Cooper’s Fun with Flags, we’re going to be looking for deadlocks.

There are numerous ways of tracking deadlocks within SQL Server but as we rarely know when they’re going to occur, don’t want traces running all day, and want to react quickly, the best method I’ve found is to have them sent to me in an email each time they appear.