In the Microsoft documentation here , we have a list of 'Supported Compatibility Level Values' for each SQL Server version. Is this information persisted in SQL Server? If not, is there any other way to fetch this information?
I looked at the Windows registry already, I did not find it.
4条答案
按热度按时间cbeh67ev1#
Microsoft used to have an approach where each version of SQL Server supported the compatibility level of the current release down to n-2.
Since the release of SQL Server 2016, the previously supported compatibility levels have not been removed (this is intended to assist with the change to certification at the database compatibility level). I'm not completely sure whether 100 will be removed in the next release of SQL Server, but I suspect that it will remain to assist with future upgrade paths.
There is a matrix that shows this pattern.
What this effectively means is that you could query the master database to get the current release compatibility level and then assume that each release down to 100 is also available.
liwlm1x92#
This should be helpfu and exactly what youre after
pkln4tw63#
Here is a query I use to get basic info on databases from a server. It queries sys.databases . To translate the compatability level you can use this list .
kzipqqlq4#
Reasonable to assume tempdb will have compatibility level of engine ?