You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -494,7 +494,7 @@ For more information about how this works, see [sp_AllNightLog documentation.](h
494
494
Known issues:
495
495
496
496
* The msdbCentral database name is hard-coded.
497
-
* sp_AllNightLog depends on Ola Hallengren's DatabaseBackup, which must be installed separately. (We're not checking for it right now.)
497
+
* sp_AllNightLog depends on Ola Hallengren's DatabaseBackup, which must be installed separately. (We expect it to be installed in the same database as the SQL Server First Responder Kit.)
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='CommandExecute')
171
172
BEGIN
172
-
RAISERROR('Ola Hallengren''s CommandExecute and DatabaseBackup must be installed in the master database. More info: http://ola.hallengren.com', 0, 1) WITH NOWAIT
173
+
RAISERROR('Ola Hallengren''s CommandExecute must be installed in the same database (%s) as SQL Server First Responder Kit. More info: http://ola.hallengren.com', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
174
+
175
+
RETURN;
176
+
END
177
+
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='DatabaseBackup')
178
+
BEGIN
179
+
RAISERROR('Ola Hallengren''s DatabaseBackup must be installed in the same database (%s) as SQL Server First Responder Kit. More info: http://ola.hallengren.com', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
173
180
174
181
RETURN;
175
182
END
176
183
177
184
/*
178
-
Make sure sp_DatabaseRestore is installed in master
185
+
Make sure sp_DatabaseRestore is installed in same database
179
186
*/
180
-
IF NOT EXISTS (SELECT*FROMmaster.sys.procedures WHERE name ='sp_DatabaseRestore')
187
+
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='sp_DatabaseRestore')
181
188
BEGIN
182
-
RAISERROR('sp_DatabaseRestore must be installed in master. To get it: http://FirstResponderKit.org', 0, 1) WITH NOWAIT
189
+
RAISERROR('sp_DatabaseRestore must be installed in the same database (%s) as SQL Server First Responder Kit. To get it: http://FirstResponderKit.org', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
183
190
184
191
RETURN;
185
192
END
@@ -912,7 +919,7 @@ LogShamer:
912
919
*/
913
920
914
921
IF @encrypt ='Y'
915
-
EXEC master.dbo.DatabaseBackup @Databases = @database, --Database we're working on
922
+
EXEC dbo.DatabaseBackup @Databases = @database, --Database we're working on
916
923
@BackupType ='LOG', --Going for the LOGs
917
924
@Directory = @backup_path, --The path we need to back up to
918
925
@Verify ='N', --We don't want to verify these, it eats into job time
@@ -925,7 +932,7 @@ LogShamer:
925
932
@ServerCertificate = @servercertificate;
926
933
927
934
ELSE
928
-
EXEC master.dbo.DatabaseBackup @Databases = @database, --Database we're working on
935
+
EXEC dbo.DatabaseBackup @Databases = @database, --Database we're working on
929
936
@BackupType ='LOG', --Going for the LOGs
930
937
@Directory = @backup_path, --The path we need to back up to
931
938
@Verify ='N', --We don't want to verify these, it eats into job time
@@ -1311,7 +1318,7 @@ IF @Restore = 1
1311
1318
1312
1319
IF @Debug = 1 RAISERROR('Starting Log only restores', 0, 1) WITH NOWAIT;
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='CommandExecute')
270
271
BEGIN
271
-
RAISERROR('Ola Hallengren''s CommandExecute and DatabaseBackup must be installed in the master database. More info: http://ola.hallengren.com', 0, 1) WITH NOWAIT
272
+
RAISERROR('Ola Hallengren''s CommandExecute must be installed in the same database (%s) as SQL Server First Responder Kit. More info: http://ola.hallengren.com', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
273
+
274
+
RETURN;
275
+
END
276
+
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='DatabaseBackup')
277
+
BEGIN
278
+
RAISERROR('Ola Hallengren''s DatabaseBackup must be installed in the same database (%s) as SQL Server First Responder Kit. More info: http://ola.hallengren.com', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
272
279
273
280
RETURN;
274
281
END
275
282
276
283
/*
277
-
Make sure sp_DatabaseRestore is installed in master
284
+
Make sure sp_DatabaseRestore is installed in same database
278
285
*/
279
-
IF NOT EXISTS (SELECT*FROMmaster.sys.procedures WHERE name ='sp_DatabaseRestore')
286
+
IF NOT EXISTS (SELECT*FROMsys.proceduresWHERE name ='sp_DatabaseRestore')
280
287
BEGIN
281
-
RAISERROR('sp_DatabaseRestore must be installed in master. To get it: http://FirstResponderKit.org', 0, 1) WITH NOWAIT
288
+
RAISERROR('sp_DatabaseRestore must be installed in the same database (%s) as SQL Server First Responder Kit. To get it: http://FirstResponderKit.org', 0, 1, @CurrentDatabaseContext) WITH NOWAIT;
0 commit comments