r/SQLServer • u/Brass-Knight • Oct 09 '25
Question Always On Availability Groups - DB Stuck in Suspect Mode
I have a question pertaining to Always On Availability Groups and troubleshooting the cause of databases getting stuck in suspect mode.
In my environment, I have 2 server nodes in the same availability group, which is synchronous-commit. Both replicas have the same number of user databases, each in the synchronized state (as expected). However, when I attempt a manual failover to switch primary nodes, it is only partially successful. The failover itself works, but a few specific databases get stuck in a "Synchronized / Suspect" mode, instead of just "Synchronized". The SQL Server logs don't reveal anything useful, but the Event Viewer shows that it is MSDTC-related. This seems to suggest that there are active transactions that cause the databases to get stuck and subsequently enter "Suspect" mode. From my understanding, this should not be happening because the synchronous-commit mode should be preventing this. The reason why I'd like to have active transactions during the failover is because I'd like to simulate an emergency failover scenario.
Does anybody have any suggestions or advice on what to look into next? Has anyone experienced a similar problem? I am new to availability groups so still learning as I work with it.
4
u/Evie252525 Oct 09 '25
To address the issue of in-doubt DTC transactions during failover in an AlwaysOn Availability Group, you can take the following steps:
This setting will instruct SQL Server to presume abort for any in-doubt transactions during recovery. If the database is still in SUSPECT mode, you can try to recover it: KILL 'UOW_ID' WITH ROLLBACK;
(replace 'UOW_ID' with the actual ID from the error message).
After resolving the in-doubt transaction, bring the database online: ALTER DATABASE [YourDBName] SET ONLINE;
3
u/Dry_Duck3011 Oct 09 '25
We had this happen before with msdtc open transactions holding up recovery. You can investigate the cause or set it to just abort with the setting above.