Refreshing the SQL Server AG virtual database
The SQL Server AG virtual database can be refreshed using the parent container snapshots. Refreshing a VDB involves re-provisioning the AG virtual database. The SQL Server AG virtual source refresh is a time-consuming operation because it involves performing a backup and restore for the SQL Server AG virtual database.
Steps to refresh the SQL Server AG virtual database are similar to refreshing a standalone VDB and VDB operations are only available in the CLI/API.
Notes
Refreshing the SQL Server AG virtual database detects any changes to the AG replicas and recreates replica databases on the latest set of replicas participating in the AG. This essentially leads to changes in mount paths and replica names.
Unlike standalone VDB, refresh for the SQL Server AG virtual database does not create a snapshot of the SQL Server AG virtual database. The snapshot creation will be supported in the future releases.
For a refresh operation to succeed on the SQL Server AG virtual database, it only needs a reachable primary replica. The state of the secondary replica of the SQL Server AG database does not matter and has no impact on the refresh operation.