Skip to content

Commit 58d491e

Browse files
authored
Merge pull request #3502 from BrentOzarULTD/3499_sp_DatabaseRestore_warnings
#3499 sp_DatabaseRestore install warnings
2 parents 3aaddcc + 1d65e5b commit 58d491e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sp_DatabaseRestore.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
IF OBJECT_ID('dbo.CommandExecute') IS NULL
2+
BEGIN
3+
PRINT 'sp_DatabaseRestore is about to install, but you have not yet installed the Ola Hallengren maintenance scripts.'
4+
PRINT 'sp_DatabaseRestore will still install, but to use that stored proc, you will need to install this:'
5+
PRINT 'https://ola.hallengren.com'
6+
PRINT 'You will see a bunch of warnings below because the Ola scripts are not installed yet, and that is okay:'
7+
END
8+
GO
9+
10+
111
IF OBJECT_ID('dbo.sp_DatabaseRestore') IS NULL
212
EXEC ('CREATE PROCEDURE dbo.sp_DatabaseRestore AS RETURN 0;');
313
GO

0 commit comments

Comments
 (0)