Skip to content

Commit cd90a78

Browse files
committed
Fix dynamic SQL looking for encrypted backups
Did not count my ticks correctly :(
1 parent f63ae44 commit cd90a78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sp_BlitzBackups.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ RAISERROR('Rules analysis starting', 0, 1) WITH NOWAIT;
999999
''The database '' + QUOTENAME(b.database_name) + '' has had '' + CONVERT(VARCHAR(10), COUNT(*)) + '' '' + b.encryptor_type + '' backups, and the last time a certificate was backed up is '
10001000
+ CASE WHEN LOWER(@MSDBName) <> N'msdb'
10011001
THEN + N'...well, that information is on another server, anyway.'' AS [Warning]'
1002-
ELSE + CONVERT(VARCHAR(30), (SELECT MAX(c.pvt_key_last_backup_date) FROM sys.certificates AS c WHERE c.name NOT LIKE '##%')) + '. AS [Warning]'
1002+
ELSE + CONVERT(VARCHAR(30), (SELECT MAX(c.pvt_key_last_backup_date) FROM sys.certificates AS c WHERE c.name NOT LIKE '##%')) + N'.'' AS [Warning]'
10031003
END +
10041004
N'
10051005
FROM ' + QUOTENAME(@MSDBName) + N'.dbo.backupset AS b

0 commit comments

Comments
 (0)