Backup History

If you want to see more than just when the last backup occurred. Here is a script for backup history with two bonus features. Backup compression ratio - CompressionRatio Backup…

Creating a Deadlock

Previously we have looked at how to capture a deadlock, but how do we go about creating a deadlock? I think the following is the simplest method: 1. Create two…

Most Recent SQL Query

Here is another query that is useful to have when you need to find out what everyone is up to. Or in some cases when we need to recover what…

SQL Index dm_db_index_xxx_stats

There are 3 dm_db_index_xxx_stats objects that can be used to check and investigate index information. sys.dm_db_index_usage_stats can be used to see how beneficial the index is, and its related maintenance…

Leap Year

A leap year can be calculated using a formula (Please see Microsoft article), however there is no real need to calculate it this way. All that is needed in sql…