Monitoring stopped Incorrect credentials or insufficient permissions
Azhkanizkael
Posts: 25 Bronze 2
Hey!
It seems to be every 2-3 weeks we get disconnected from monitoring an Azure Managed Instance.
When I dive into the log file, I find this in the error:
Any ideas as to what's going on? Credentials didn't change as all I need to do to reconnect is enter the same credentials we've always used for the user.
It seems to be every 2-3 weeks we get disconnected from monitoring an Azure Managed Instance.
When I dive into the log file, I find this in the error:
[Class]: '14'
[LineNumber]: '19'
[Message]: 'Connections to this database are no longer allowed.'
[Number]: '40863'
[Procedure]: ''
[Server]: '*.database.windows.net'
[Source]: 'Core Microsoft SqlClient Data Provider'
[State]: '2'
Any ideas as to what's going on? Credentials didn't change as all I need to do to reconnect is enter the same credentials we've always used for the user.
Tagged:
Best Answer
-
ATurner Posts: 204 Silver 2Hi Azhkanizkael
increasing the timeout may help alleviate the issue whilst it is failing over from configuration > monitored servers edit credentials on the MI then under SQL instance edit properties
Answers
This looks to be an error from the MI. Sometimes this error can occur when there is some corruption detected on the database. There is a blog here that seems to have a similar issue https://sqltechblog.com/2020/04/15/its-2020-do-i-really-need-to-dbcc-checkdb/
CHECKDB found 0 allocation errors and 0 consistency errors in database '<dbname>'.
So it doesn't look like there's any corruption; at least at the current time. It might be a bit tricky to figure out if there somehow becomes a tiny bit of corruption at the time of disconnect.
Would it be possible to build some sort of "auto-retry" mechanism for when this happens?
Maybe it's something we can work around or tell it to not attempt to connect to?
Have you enabled auto retrying in SQL monitor? https://documentation.red-gate.com/sm/adding-and-managing-monitored-servers/managing-monitored-servers/reconnecting-automatically-after-monitoring-stopped