Availability Group - how much data was lost after forced failover
- Go to SSMS
- Object Explorer
- Expand
Always On High Availability
- Expand
Availability Groups
- Right click your AG
- Select
Show Dashboard
In the dashboard, above the list of AG databases and their status, there is Add/Remove Columns
button
Pick Estimated Data Loss (time)
and add this column to dashboard
You will be able to see the estimated data loss time for each DB
You can check this dashboard right before you are going to do forced failover, to get the idea of how much data can be lost
You can create a "canary" table which contains only one row with one datetime column and update this column on scheduled basis (every minute, for example). This way you can check this table on secondary replica (even when primary one is already unavailable) and be sure that it is synchronized at least till this timestamp (actully you may lose less data because some transactions may be synced after the last "canary" table update job was executed).