Tracking Deprecated Features in SQL Server

Tracking Deprecated Features in SQL Server

Deprecated Feature SQL

With each new release of SQL Server, we gain exciting new features—but also face the reality of deprecated features that should be phased out. Although these deprecated features aren’t immediately disabled, they won’t be supported in future SQL Server versions. Ideally, you should start removing them from your code now to avoid potential issues during future upgrades.

Ideally.  

But let’s be honest—how often does that happen? Even if you’re committed to staying current, finding out which deprecated features are still in use can be a challenge. Fortunately, SQL Server tracks this information for you. Simply run the following query against sys.dm_os_performance_counters to get a list of deprecated features and how many times each of them has been used.

SELECT  object_name, instance_name, cntr_value
FROM	sys.dm_os_performance_counters
WHERE   counter_name = 'Usage'

According to the MSDN doc on the Deprecated Features Object, doing this:

provides a counter to monitor the features designated as deprecated. In each case the counter provides a usage count that lists the number of times the deprecated feature was encountered since SQL Server last started.

Microsoft SQL Server, Deprecated Features object

(That MSDN doc also has a description of what each of the deprecated features is, which is very useful.)

While this won’t tell you where a deprecated feature is being used, it will tell you which ones are being used. Knowing which deprecated features are still in use is crucial when planning a migration to a new SQL Server release, especially if those features will no longer be supported. This insight helps prevent disruptions and ensures a smoother transition to the updated system.

Want to work with The SERO Group?

Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? Schedule a no-obligation discovery call with us to get started.

 

Leave a Reply

Your email address will not be published. Required fields are marked *