Last night one of our mirrored databases failed over and then failed back automatically. This seems strange behaviour to me as no other mirrored DB failed over with it. The messages I got in order were:
Database mirroring is inactive for database 'xx'.
Starting up database 'XX' (for all databases but the one in question)
The mirrored database "XX" is changing roles from "PRINCIPAL" to "MIRROR" because the mirroring session or availability group failed over due to role synchronization. This is an informational message only. No user action is required.
Following this was the recovery of all the other databases but this one.
Later on we got a different problem as it looks like we had a network issue and was getting the following:
The mirroring connection to "TCP://xxx.xxx.xxx:5022" has timed out for database "xxx" after 10 seconds without a response. Check the service and network connections.
Database mirroring is inactive for database 'XX'.
The mirrored database "XX" is changing roles from "MIRROR" to "PRINCIPAL" because the mirroring session or availability group failed over due to automatic failover
I am a little confused why this particular database acted different from all the others, and also what caused the initial failover. The secondary failover make more sense as there was a loss of connection to the mirror hence the DB failed back to the Principle.
Thanks for any hints