SQL database v12 allows querying the database edition and service objective through t-sql using databasepropertyex. One has to connect to the database to get the edition / serviceobjective of that database. This query won’t return the results if run on the master database. Here are the results for a standard, S0 database
Syntax:
select DATABASEPROPERTYEX(db_name(),’serviceobjective’)
select DATABASEPROPERTYEX(db_name(),’serviceobjectiveid’)
select DATABASEPROPERTYEX(db_name(),’edition’)
Returns:
S0
f1173c43-91bd-4aaa-973c-54e79e15235b
Standard