Open roji opened 1 year ago
For the first item you could also execute:
SELECT ServerProperty('EngineEdition')
and check for 5, 8 or 11
@ErikEJ we generally don't do runtime checking of database capabilities like this - otherwise we could have also attempted to check the database's compatibility level (#30163) rather than requiring users to explicitly configure it. One reason for that is that we don't always have a database to connect to (e.g. when generating SQL scripts for migrations).
30163 is about allowing users to specify their SQL Server compatibility level, allowing them to say they're using an old database which doesn't support some feature (e.g. OPENJSON). We could also allow users to inform us that they're targeting SQL Azure. This could have the following effects:
Think specifically about the impact on people testing against non-Azure SQL, which may need to configure differently for testing vs. production etc.