Blog Post

Tracking Deprecated Features

,

This week I'm in Brno, Czech Republic leading an App Compat seminar for Microsoft clients here, and one of the things we need to look for in their applications is the use of deprecated features. I was poking around the sys.os_performance_counters DMV and discovered the [sqlinstance]:Deprecated Features object and found that if your application uses a deprecated feature, SQL Server increments the appropriate counter.

For example, on my SQL Server instance INST03, I looked at the value for the use of the sysdatabases backward compatibility view using the following query:

select * from sys.dm_os_performance_counters
where object_name = 'MSSQL$INST03:Deprecated Features'
and instance_name = 'sysdatabases'

When I ran it the first time it returned the value of 2 in the cntr_value column. I then selected from that view, then ran the query again, and it returned 3.

If you're trying to track the use of deprecated features to eliminate them from your application, this is a quick and easy way to find which features (a) are deprecated and (b) your application is using.

Allen


Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating