Skip to content

Be Wary of Date Formatting in T-SQL

Today’s public service announcement is a reminder to be wary of date formatting in SQL Server. On a recent mailing list discussion, one person demonstrated the following code (which I’ve adapted for this post): SET… 

Testing for Object Existence: CREATE OR ALTER

  • by

For the longest time, T-SQL writers have had to wrestle with ways of testing for an object’s existence so that it can either be dropped and recreated, or modified as needed. Last week we covered… 

Testing for Object Existence: DROP … IF EXISTS

  • by

For the longest time, T-SQL writers have had to wrestle with ways of testing for an object’s existence so that it can either be dropped and recreated, or modified as needed. This is especially common… 

Temporal Tables and History Retention

  • by

I’m a huge fan of Temporal Tables in SQL Server 2016. I first wrote about them, in a four-part series in November 2015, before SQL Server was even released. I don’t always get this excited… 

Wait For Service Pack 1

  • by

Conventional wisdom tells us that when Microsoft releases a new version of any server product, we should wait until Service Pack 1 before deploying it to production. This hasn’t been true for a while now, since Microsoft… 

Should I upgrade SQL Server 2012, or migrate to Azure?

  • by

[Last updated February 27, 2020] Brent Ozar Unlimited runs a website called SQL Server Updates which comes in really handy for keeping your on-premises SQL Server up to date. Of interest is that extended support… 

The Data Migration Assistant

  • by

I’ve written quite a lot about Azure SQL Database recently, but that doesn’t mean I’ve forgotten about the on-premises version of SQL Server. What could be better than Microsoft announcing a new tool for upgrading… 

The Resilience of the Log Backup Chain

Much has been written about the log backup chain in SQL Server, where we are able to restore a database to a point in time using a combination of full, differential and transaction log backups. This… 

Cumulative Updates Are First Class

Since 27 January 2016, Microsoft recommends that Cumulative Updates be installed with the same confidence as Service Packs, and installed as they become available. The official announcement was posted on 24 March 2016 (their emphasis):… 

Total Recall

This is the final entry in my #SQLNewBlogger challenge. You can read the previous entries here: Part 1: The Intersection of Art and Science Part 2: The Art of Improvisation Part 3: What Motivates You?… 

Goodbye, old friend

  • by

SQL Server 2000, I will miss you. Two months ago, my last customer running on SQL Server 2000 took the plunge, and upgraded to SQL Server 2005. Last night between 9pm and 1:30am this morning,… 

Duplicate Index Finder updated

The SQL Server 2000 Duplicate Index Finder has been updated. I presented the newest version tonight at the SQLskills.com immersion event open night. Grab the scripts here. Changes include a workaround for appending RID and… 

Remove duplicate indexes in SQL Server 2000

  • by

With permission from Kimberly Tripp, the creator of the fantastic duplicate index finder for SQL Server 2005 and 2008, I have ported this duplicate index finder to SQL Server 2000. I am fortunate in many…