You are the database administrator for a SQL Server 2019 instance on Azure Virtual Machines. The instance hosts a database that must be available during a planned operating system update that requires a restart of the virtual machine. You need to ensure that the database remains online with minimal downtime. What should you do?
An Always On availability group with a synchronous secondary replica allows you to perform a manual failover to the secondary before restarting the primary VM. The database remains online on the secondary, and after the primary VM restarts, you can fail back. This provides minimal downtime during the planned OS update, meeting the requirement.
Why this answer
To keep the database online during a planned OS update that requires a VM restart, you should use an Always On availability group with a synchronous secondary replica. Before restarting the primary VM, you manually fail over to the secondary, which becomes the new primary and keeps the database online. After the update, you can fail back.
Other options either cause downtime or are not suitable for this scenario.