From 8f5b195ea6cdbbe193a43e2b698628ff3a7a54c4 Mon Sep 17 00:00:00 2001 From: Philippe Meunier Date: Thu, 16 Jan 2025 10:08:31 -0500 Subject: [PATCH] Update sp_DatabaseRestore.sql Increase @CommandExecuteCheck size so large database name fits in the command --- sp_DatabaseRestore.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp_DatabaseRestore.sql b/sp_DatabaseRestore.sql index 905518c5..f478a9d8 100755 --- a/sp_DatabaseRestore.sql +++ b/sp_DatabaseRestore.sql @@ -240,7 +240,7 @@ END; BEGIN TRY DECLARE @CurrentDatabaseContext AS VARCHAR(128) = (SELECT DB_NAME()); -DECLARE @CommandExecuteCheck VARCHAR(315) +DECLARE @CommandExecuteCheck VARCHAR(400); SET @CommandExecuteCheck = 'IF NOT EXISTS (SELECT name FROM ' +@CurrentDatabaseContext+'.sys.objects WHERE type = ''P'' AND name = ''CommandExecute'') BEGIN