I am going to
upgrade BC140 CU 11 to CU 20 (In order to apply some platform bugs fixed by microsoft)
Error occured when open Db in step of converting Db to new CU version
"
ALTER DATABASE ... SET SINGLE_USER is not supported"
Database is hosted in
Azure SQL Managed Instance (aka SQL MI)
After a few research, I realized that SQL MI does not support mode differ than MULTI_USER
Ref link:
https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/transact-sql-tsql-differences-sql-server#alter-database-statement
With the same process, SQL Server get success. So SQL MI is the point
I think upgrade toolkit had embeded "ALTER DATABASE ... SET SINGLE_USER" in function flow which could not be touched
In this case, my proposed solution look like:
1. Restore Db to SQL Server
2. Upgrade new CU
3. Re-attach to SQL MI
It would be graceful if anyone else faced or share experiences when working with SQL MI, thank much!
Full error msg:
---------------------------
Microsoft Dynamics NAV Development Environment
---------------------------
The following SQL Server error or errors occurred: 5008,"42000",[Microsoft][SQL Server Native Client 11.0][SQL Server]This ALTER DATABASE statement is not supported. Correct the syntax and execute the statement again.
5069,"42000",[Microsoft][SQL Server Native Client 11.0][SQL Server]ALTER DATABASE statement failed.
SQL:
ALTER DATABASE [Db_Name] SET SINGLE_USER
---------------------------
OK
---------------------------
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!