Check a Azure SQL database is Managed instance or standalone

Sandz 71 Reputation points
2021-11-08T11:28:17.01+00:00

Hi All,

How can I check whether a Azure database is part of Azure managed instance or standalone database?

Thanks
SS

Azure SQL Database
0 comments No comments
{count} vote

Accepted answer
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2021-11-08T23:50:45.78+00:00

    Please see T-SQL example:

    IF( SERVERPROPERTY('EngineEdition') = 8 )   
    BEGIN  
        PRINT 'This is an Azure SQL Managed Instance.';  
    END  
    ELSE  
    BEGIN  
    PRINT 'This is NOT an Azure SQL Managed Instance.';  
    END  
    

    Value 5 (SQL Database) belongs to Azure SQL. See all possible Engine Editions here.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.