Skip to content

Commit

Permalink
Merge pull request #3511 from garyhuntddn/garyhuntddn-patch-2
Browse files Browse the repository at this point in the history
NumDatabases includes those already marked as unreachable
  • Loading branch information
BrentOzar authored May 22, 2024
2 parents 0fba643 + f07681d commit 8965572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sp_BlitzIndex.sql
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ ELSE
ELSE @DatabaseName END;
END;

SET @NumDatabases = (SELECT COUNT(*) FROM #DatabaseList AS D LEFT OUTER JOIN #Ignore_Databases AS I ON D.DatabaseName = I.DatabaseName WHERE I.DatabaseName IS NULL);
SET @NumDatabases = (SELECT COUNT(*) FROM #DatabaseList AS D LEFT OUTER JOIN #Ignore_Databases AS I ON D.DatabaseName = I.DatabaseName WHERE I.DatabaseName IS NULL AND ISNULL(D.secondary_role_allow_connections_desc, 'YES') != 'NO');
SET @msg = N'Number of databases to examine: ' + CAST(@NumDatabases AS NVARCHAR(50));
RAISERROR (@msg,0,1) WITH NOWAIT;

Expand Down

0 comments on commit 8965572

Please sign in to comment.