marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
430 stars 168 forks source link

SQL-Watch does not count secondary not readable replicas #461

Open hvoges opened 2 years ago

hvoges commented 2 years ago

Describe the bug SQL-Watch does not count non-readable Replicas on Always On Clusters.

To Reproduce Run select * from dbo.sqlwatch_meta_database on a secondary Replica with offline Replicas. There are no Entries for the Replicas, and as a result, they are not accounted for.

Expected behavior Mirrored Offline-Databases should be counted, especially as they use diskspace.

Screenshots image

Windows Server (please complete the following information):

SQL Server (please complete the following information):

SQL Server Management Studio (SSMS -> about -> copy info): SQL Server Management Studio 15.0.18424.0 SQL Server Management Objects (SMO) 16.100.47021.0+7eef34a564af48c5b0cf0d617a65fd77f06c3eb1 Microsoft Analysis Services-Clienttools 15.0.19750.0 Microsoft Data Access Components (MDAC) 10.0.14393.0 Microsoft MSXML 3.0 6.0 Microsoft .NET Framework 4.0.30319.42000 Betriebssystem 10.0.14393

SQLWATCH version (from DACPAC or from sysinstances) 4.4.0.523

marcingminski commented 2 years ago

Thanks for this. This behaviour was introduced by this fix: https://github.com/marcingminski/sqlwatch/issues/107, and its currently by design. I suppose we could marry those two together.

hvoges commented 2 years ago

Thank you for your fast answer. The behaviour is a bit confusing as the count in the dashboard does not show the actual count.

marcingminski commented 2 years ago

I agree with you. I will keep this open and will think about how to address this.