Here is the error thrown from the Service control monitoring service and the logs size grow more than 1 GB each day. Recently the metrics is enabled to true () for monitoring the service and after this change this error is thrown continuously.
23:59:58.7927|71|Error|ServiceControl.Transports.SqlServer.QueueLengthProvider|Error querying sql queue sizes.
System.Data.SqlClient.SqlException (0x80131904): The server principal "XXX" is not able to access the database "YYY" under the current security context.
Service control , monitoring services run under network security whereas endpoint queues run under MSA account. I found another post related to service control queueing size error which may be related to this error. SQL Transport queue size query causes entire system degradation · Issue #1846 · Particular/ServiceControl · GitHub
Nservicebus 7.2.x is used for the endpoints and latest service control version is deployed. Please assist in resolving this error.