为什么我会得到:“在数据库‘master’中不能设置‘single#user’选项”?

nc1teljy  于 2021-08-13  发布在  Java
关注(0)|答案(0)|浏览(351)

当我试图在c#中运行允许用户登录和注册帐户的后端应用程序时,出现以下错误:

  1. Microsoft.EntityFrameworkCore.Database.Command: Error: Failed executing DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='60']
  2. IF SERVERPROPERTY('EngineEdition') <> 5
  3. BEGIN
  4. ALTER DATABASE [master] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  5. END;
  6. fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
  7. Failed executing DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='60']
  8. IF SERVERPROPERTY('EngineEdition') <> 5
  9. BEGIN
  10. ALTER DATABASE [master] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  11. END;
  12. Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.EntityFrameworkCore.Relational.dll
  13. Exception thrown: 'System.AggregateException' in System.Private.CoreLib.dll

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题