In SQL Server, you can use the sys.dm_os_performance_counters
system dynamic management view to return a list of the features designated as deprecated in the current instance of SQL Server.
To return just the deprecated features, filter the view to just the SQLServer:Deprecated Features object.
The view also includes a counter that lists the number of times each deprecated feature was encountered since SQL Server last started. This can be helpful for identifying whether or not your application is still using any deprecated features.
Running this on SQL Server requires VIEW SERVER STATE
permission.