Skip to content

Commit a775ae7

Browse files
authored
sp_AllNightLog - remove hard coded collation
I get a little nervous when we hard-code database collations, especially on a join between master.sys.databases and something in msdb. If you have two different collations in those two system databases, you've got bigger problems.
1 parent ac4c823 commit a775ae7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sp_AllNightLog.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ IF @Restore = 1
12071207
/* Validation check to ensure the database either doesn't exist or is in a restoring/standby state */
12081208
SELECT 1
12091209
FROM sys.databases d
1210-
WHERE d.name = rw.database_name COLLATE SQL_Latin1_General_CP1_CI_AS
1210+
WHERE d.name = rw.database_name
12111211
AND state <> 1 /* Restoring */
12121212
AND NOT (state=0 AND d.is_in_standby=1) /* standby mode */
12131213
)

0 commit comments

Comments
 (0)