From 1d65e5b99c4e28e600f715680f31fd18f35af875 Mon Sep 17 00:00:00 2001 From: Brent Ozar Date: Fri, 19 Apr 2024 09:47:44 -0700 Subject: [PATCH] #3499 sp_DatabaseRestore install warnings Let them know that they'll need Ola's scripts. Closes #3499. --- sp_DatabaseRestore.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sp_DatabaseRestore.sql b/sp_DatabaseRestore.sql index 43805aee..9491740c 100755 --- a/sp_DatabaseRestore.sql +++ b/sp_DatabaseRestore.sql @@ -1,3 +1,13 @@ +IF OBJECT_ID('dbo.CommandExecute') IS NULL +BEGIN + PRINT 'sp_DatabaseRestore is about to install, but you have not yet installed the Ola Hallengren maintenance scripts.' + PRINT 'sp_DatabaseRestore will still install, but to use that stored proc, you will need to install this:' + PRINT 'https://ola.hallengren.com' + PRINT 'You will see a bunch of warnings below because the Ola scripts are not installed yet, and that is okay:' +END +GO + + IF OBJECT_ID('dbo.sp_DatabaseRestore') IS NULL EXEC ('CREATE PROCEDURE dbo.sp_DatabaseRestore AS RETURN 0;'); GO