For years I have struggled to find a good way to do TSQL formatting. Here is a short video of how to simple TSQL cleanup and formatting using just SQL Server Management Studio (SSMS). This works on SSMS from SQL Server 2005, all the way up to the latest release of SQL Server Management Studio. It is not as nice …

TSQL Formatting and Wild Card Expansion Read more »

Change Tracking is a great feature on SQL Server, but it can have some performance implications. It is however one of those features that doesn’t jump out as obvious if it is enabled until you start digging around on the table properties dialog. Here is where you can find it for a specific table. But what if I don’t have …

Find all tables with Change Tracking on your SQL Server Read more »

The SQL Server compatibility level is a SQL Server setting. This is the setting that controls some of the features of how the SQL Server database engine runs, for instance the cardinality estimator. Some people have found problems with certain queries when updating to SQL Server 2016 for instance due to the changes in the cardinality estimator.   If you …

Find databases running on an older compatibility level Read more »

With SQL Server 2019, there is a new compatibility level introduced, level 150 the new SQL Server 2019 Compatibility Level. SQL Server can run in a number of different compatibility levels, but how do you change it and how do you set it. These compatibility levels reflect the version of SQL server. 60 = SQL Server 6.0 65 = SQL …

SQL Server 2019 Compatibility Level Read more »

This confused me for a few minutes today and I wanted to share to help avoid further confusion.   The specific code was this: Names have been changed to protect the innocent.   In the above delete statement which table will have rows deleted from it? A: Table1 B: Table2 C: Both Table1 and Table2 D: Neither Table1 and Table2  

With SQL Server 2017, there was a new compatibility level introduced, level 140 the new SQL Server 2017 Compatibility Level. SQL Server can run in a number of different compatibility levels, but how do you change it and how do you set it. These compatibility levels reflect the version of SQL server. 60 = SQL Server 6.0 65 = SQL Server …

SQL Server 2017 Compatibility Levels Read more »