BrentOzarULTD / SQL-Server-First-Responder-Kit

sp_Blitz, sp_BlitzCache, sp_BlitzFirst, sp_BlitzIndex, and other SQL Server scripts for health checks and performance tuning.
http://FirstResponderKit.org
Other
3.38k stars 1k forks source link

Database count does not exclude all databases that will be excluded #3516

Closed garyhuntddn closed 6 months ago

garyhuntddn commented 6 months ago

Version of the script dev branch

What is the current behavior? The numebr of databases reported excludes those identified for exclusion, but does not exclude those which are classified with a secondary_role_allow_connections_desc = "NO" setting.

See #3511 for a possible fix

If the current behavior is a bug, please provide the steps to reproduce. Query a server with a large number of databases, of which some will have secondary_role_allow_connections_desc = NO

What is the expected behavior? That the number of databases reported is consistent and excludes all that will not be processed

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures? will affect all versions, I'm on v2022 on Win and *nix

BrentOzar commented 6 months ago

Thanks for the pull request! Looks good, merging into the dev branch, will be in the next release with credit to you in the release notes.