Unable to use ALTER DATABASE SET MULTI_USER | SINGLE_USER on Azure SQL Managed Instance PaaS

hrprt 26 Reputation points
2022-12-08T14:16:45.423+00:00

Hi,

I am unable to use the ALTER DATABASE SET MULTI_USER | SINGLE_USER on Azure SQL Managed Instance PaaS. It returns the following error message:

Msg 5008, Level 16, State 11, Line 4
This ALTER DATABASE statement is not supported. Correct the syntax and execute the statement again.
Msg 5069, Level 16, State 1, Line 4
ALTER DATABASE statement failed.

I have tried setting the compatibility level to both 150 (2019) and 160 (2022) with the same result.

Could someone please suggest what are the alternatives to the above statements, when using Azure SQL MI version?

Thanks

Azure SQL Database
0 comments No comments
{count} vote

Accepted answer
  1. Alberto Morillo 32,886 Reputation points MVP
    2022-12-08T14:52:11.377+00:00

    It is not supported SINGLE_USER, OFFLINE and good number of ALTER DATABASE options as noted on this documentation. No alternative to my knowledge.

    Use the latest versions of SSMS like v19 or v18.12, using T-SQL you should be able to change the compatibility level. Please read available/compatible levels available for Managed Instance here.


0 additional answers

Sort by: Most helpful