Question

I'm seeking a bit of clarification around SQL Azure versions and upgrades. Upon trying to use some specific functionality it came to my attention that the compatibility level of the database was 100 (I needed 130). Upon looking a bit further I see that the engine version is reported as 12.0.2000.8 (equivalent to SQL Server 2014), but I need to be at a minimum engine version of 13.x in order to use compatibility level 130.

What do I need to do to upgrade the engine version for this SQL Azure instance? The article Hot patching SQL Server Engine in Azure SQL Database specifically states:

Azure SQL Database is evergreen, meaning that it always has the latest version of the SQL Engine

Additionally, answers like this one imply that the engine will always be v.latest but the versions reported will be incorrect.

Does this mean that I can ignore the reported engine version and go ahead with setting the compatibility level, or are there other steps I need to take to upgrade the engine?

Was it helpful?

Solution

Yes, you can ignore the reported engine version in Azure SQL Database. This note was added to the @@VERSION function in March of 2018, so I guess it's not gonna change anytime soon:

We are aware of an issue where the product version reported by @@VERSION is incorrect for Azure SQL Database. The version of the SQL Server database engine run by Azure SQL Database is always ahead of the on-premises version of SQL Server, and includes the latest security fixes. This means that the patch level is always on par with or ahead of the on-premises version of SQL Server, and that the latest features available in SQL Server are available in Azure SQL Database.

To programmatically determine the engine edition, use SELECT SERVERPROPERTY('EngineEdition'). This query will return '5' for Azure SQL Database and '8' for Azure SQL Managed Instance.

We will update the documentation once this issue is resolved.

OTHER TIPS

Just try it. Set the compatibility level to what you need and implement that feature. If it works, the level is supported. If it throws an error then you know it's not up-to-date.

My experience with Azure SQL is that it's always up to date.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top