From f1b69e62ac901f3266c5ec2030874e843e885e5b Mon Sep 17 00:00:00 2001 From: akpaevj Date: Tue, 5 Mar 2024 16:38:02 +0300 Subject: [PATCH] s --- Common/Sql.sbsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Sql.sbsl b/Common/Sql.sbsl index 2ce1e26..83897a6 100644 --- a/Common/Sql.sbsl +++ b/Common/Sql.sbsl @@ -138,7 +138,7 @@ method SetSingleUserMode(Connection: SqlConnection, DatabaseName: String) val Query = Connection.CreateQueryWithoutSelect( "IF EXISTS (SELECT 1 FROM sys.databases WHERE [name] = N'%DatabaseName') BEGIN - EXEC (N'ALTER DATABASE %DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE;'); + EXEC (N'ALTER DATABASE [%DatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;'); END;") Query.Execute() @@ -148,7 +148,7 @@ method SetMultiUserMode(Connection: SqlConnection, DatabaseName: String) val Query = Connection.CreateQueryWithoutSelect( "IF EXISTS (SELECT 1 FROM sys.databases WHERE [name] = N'%DatabaseName') BEGIN - EXEC (N'ALTER DATABASE %DatabaseName SET MULTI_USER;'); + EXEC (N'ALTER DATABASE [%DatabaseName] SET MULTI_USER;'); END;") Query.Execute()