March 8, 2021 at 12:00 am
Comments posted to this topic are about the item Deprecated Features
March 8, 2021 at 12:27 pm
Where's the real answer: Google it
March 8, 2021 at 5:38 pm
When I Google it, the very first link I get is: https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-version-15?view=sql-server-ver15
And it contains the code marked as correct in the question. What are you referring to?
March 8, 2021 at 5:59 pm
I agree with GaryV. The sys.dm_os_performance_counters view only provides a list of deprecated features and how often they have been used since startup. It just doesn't have much utility.
Using an event session to log Deprecation Announcement and Deprecation Final Support events gives a more complete picture (who, what, where, when etc.) of the use of deprecated features.
March 8, 2021 at 6:27 pm
My comment was partially in jest wrt the quiz, but with some seriousness. I'm not going to remember what to do to find deprecated features. But I will always know that I can attempt to search online for the answer.
And then if the answer given as correct doesn't really answer the question - Well how do you find all the features that were deprecated so you don't use them in the future?
March 8, 2021 at 8:09 pm
There isn't a good list overall. If you write code, and track the counter, you can see if you've tripped something with your code.
Ultimately, you'd have to check the docs page for each code item to determine if things are deprecated. There isn't a "list" because things change with each version, and I'm not sure MS has compiled a good list. There are some, like https://docs.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver15, but they aren't great, nor do I think they are really complete.
March 9, 2021 at 7:53 am
So, if you do not use any of the deprecated features, SELECT * FROM sys.dm_os_performance_counters WHERE object_name = 'SQLServer:Deprecated Features'; will produce no rows?
I ran it and it produced no rows.
March 9, 2021 at 4:08 pm
This is a counter, so it gets triggered when code runs with a deprecated feature.
March 9, 2021 at 4:16 pm
Good to know I do not use any of them
March 9, 2021 at 4:20 pm
Actually, this appears to have a list in 2019, even after restart.
If you run this on 2017, nothing appears. Even if I do something like:
EXEC sp_addtype @typename = 'mytype', @phystype = 'int'
I get nothing. I suspect this doesn't work in SQL2017-
March 10, 2021 at 7:40 am
A bit hit-and-miss then. How do you check if it has been deprecated?
March 10, 2021 at 4:50 pm
Check what? A feature? Code? There are lists of deprecated features, but these aren't well maintained. I haven't checked the XEvents, but supposedly those should catch code running that is deprecated.
March 11, 2021 at 7:43 am
A bit of a minefield then - like posting jokey responses in a forum. I just meant that how would you find whether a method being used to list deprecated features was being deprecated?
The lists of deprecated features - normal human behaviour. All the new stuff is listed and publicised well but the abandoned stuff not so well maintained. I suppose someone could compile all the release notes and it would all be in there?
March 11, 2021 at 3:20 pm
I'm not quite sure. Do you mean
a) using sys.dm_os_performance_counters to check deprecated features with a counter has the counter deprecated?
b) I have a function that calls sp_addserver, and that proc call is deprecated?
The release notes, or the page I listed (https://docs.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver15) show this, but only a few versions back. MS has changed the way they doc things, so I'm not sure it's as easy as release notes. My guess is that some stuff was just announced, before they build this "discontinued features" page and you'd have to have seen the announcement.
Really, it is a mess. I think XEvents or the perf counter are the best ways in 2019. Since the counter doesn't seem to work in a few instances for me on 2017, I suspect XEvents is best for some versions, but I don't know.
This has a list: https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object?view=sql-server-ver15
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply