In SQL Server, the sys.dm_os_performance_counters
system dynamic management view returns the performance counters maintained by the server.
One of the many things you can do with sys.dm_os_performance_counters
is return a list of deprecated features in the current instance of SQL Server. You can also use this list to see how many times a deprecated feature has been used since SQL Server was started.
This is quite possibly the quickest way to find out if you’re using a deprecated feature in SQL Server.
The view returns a row per performance counter maintained by the server. The SQLServer:Deprecated Features object provides a counter to monitor the features designated as deprecated. It has a cntr_value
column, which provides a usage count that lists the number of times the deprecated feature was encountered since SQL Server last started.
Therefore, by running a query against this view, we can return all deprecated features along with a count of how many times each one was encountered since SQL Server last started.
Continue reading →