The primary use of [AOAG] is to synchronize multiple SQL Server instances into a failover-safe environment. All other members are updated when the primary server is updated, so each member is ready if it is set as the primary. Only the primary instance is used at any given time and can remain the primary for as long as needed, until it fails over to another member.
The following script checks whether all members have the proper settings for safe failover when required.
[In SSMS]
Right-click on the [Listener,2433] Node.
Choose [New Query]
Copy and paste the following SQL Script into the Query window.
selectag.name
, ar.replica_server_name
, ar.availability_mode_desc
, ar.failover_modefromsys.availability_groups ag
innerjoinsys.availability_replicas ar
on ar.group_id = ag.group_id