Skip to content

Commit 45cc09f

Browse files
authored
rollback reformatting for mentioned rows
1 parent 864d05a commit 45cc09f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

sp_Blitz.sql

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6778,12 +6778,7 @@ IF @ProductVersionMajor >= 10
67786778

67796779
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 99) WITH NOWAIT;
67806780

6781-
EXEC dbo.sp_MSforeachdb 'USE [?];
6782-
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
6783-
IF EXISTS (SELECT * FROM sys.tables WITH (NOLOCK) WHERE name = ''sysmergepublications'' )
6784-
IF EXISTS ( SELECT * FROM sysmergepublications WITH (NOLOCK) WHERE retention = 0)
6785-
INSERT INTO #BlitzResults (CheckID, DatabaseName, Priority, FindingsGroup, Finding, URL, Details)
6786-
SELECT DISTINCT 99, DB_NAME(), 110, ''Performance'', ''Infinite merge replication metadata retention period'', ''https://www.brentozar.com/go/merge'', (''The ['' + DB_NAME() + ''] database has merge replication metadata retention period set to infinite - this can be the case of significant performance issues.'')';
6781+
EXEC dbo.sp_MSforeachdb 'USE [?]; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; IF EXISTS (SELECT * FROM sys.tables WITH (NOLOCK) WHERE name = ''sysmergepublications'' ) IF EXISTS ( SELECT * FROM sysmergepublications WITH (NOLOCK) WHERE retention = 0) INSERT INTO #BlitzResults (CheckID, DatabaseName, Priority, FindingsGroup, Finding, URL, Details) SELECT DISTINCT 99, DB_NAME(), 110, ''Performance'', ''Infinite merge replication metadata retention period'', ''https://www.brentozar.com/go/merge'', (''The ['' + DB_NAME() + ''] database has merge replication metadata retention period set to infinite - this can be the case of significant performance issues.'')';
67876782
END;
67886783
/*
67896784
Note that by using sp_MSforeachdb, we're running the query in all
@@ -7048,12 +7043,11 @@ IF @ProductVersionMajor >= 10
70487043
''Multiple Log Files on One Drive'',
70497044
''https://www.brentozar.com/go/manylogs'',
70507045
(''The ['' + DB_NAME() + ''] database has multiple log files on the '' + LEFT(physical_name, 1) + '' drive. This is not a performance booster because log file access is sequential, not parallel.'')
7051-
FROM [?].sys.database_files
7052-
WHERE type_desc = ''LOG''
7046+
FROM [?].sys.database_files WHERE type_desc = ''LOG''
70537047
AND ''?'' NOT IN (''rdsadmin'',''tempdb'')
70547048
GROUP BY LEFT(physical_name, 1)
7055-
HAVING COUNT(*) > 1 AND SUM(size) < 268435456
7056-
OPTION (RECOMPILE);';
7049+
HAVING COUNT(*) > 1
7050+
AND SUM(size) < 268435456 OPTION (RECOMPILE);';
70577051
END;
70587052

70597053
IF NOT EXISTS ( SELECT 1

0 commit comments

Comments
 (0)