Always-On SQL Configuration between On-Premise server and Azure VM

Ankit Mishra 5 Reputation points
2024-08-06T17:22:33.0866667+00:00

Hello,

We have a Single Instance SQL server running On-Premise and trying to setup a DR for the same on Azure.

Can there be an Always-On configuration between On-Premise and an Azure VM?

If yes, please provide link to Microsoft documentation.

Regards,

Ankit

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,034 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Zahid Butt 956 Reputation points
    2024-08-06T18:07:04.08+00:00

    Hi,

    I have not done this myself but material through copilot:

    Configuring SQL Server Always On availability groups between an on-premise server and an Azure VM involves several steps to ensure high availability and disaster recovery. Here’s a high-level overview of the process:

    1. Set Up a VPN Connection: Establish a secure VPN connection between your on-premise network and Azure. This allows the on-premise server and Azure VM to communicate as if they are on the same network.
    2. Create a Windows Server Failover Cluster (WSFC): Both the on-premise server and the Azure VM need to be part of the same WSFC. This cluster will manage the availability group.
    3. Configure SQL Server Instances: Install and configure SQL Server on both the on-premise server and the Azure VM. Ensure that the SQL Server instances are part of the WSFC.
    4. Create the Availability Group: Using SQL Server Management Studio (SSMS), create an Always On availability group. Add the databases you want to replicate and configure the replicas (primary and secondary).
    5. Set Up the Listener: Configure an availability group listener to provide a single connection point for applications. This listener will route traffic to the primary replica.
    6. Test the Configuration: Verify that the availability group is working correctly by failing over between the on-premise server and the Azure VM.

    For detailed steps & best practices you may refer to below :

    https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/availability-group-overview?view=azuresql

    https://learn.microsoft.com/en-us/answers/questions/1473685/on-premises-and-azure-sql-vm-always-on-availabilit

    https://www.youtube.com/watch?v=eUDLx7G6WMQ

    0 comments No comments

  2. LucyChenMSFT-4874 5,060 Reputation points
    2024-08-07T01:54:08.4766667+00:00

    Hi @Ankit Mishra ,

    Thank you for your reaching out and welcome to Microsoft Q&A!

    Can there be an Always-On configuration between On-Premise and an Azure VM?

    Yes, in addition to Zahid's answer, we can also extend the on-premises Availability Groups to Microsoft Azure by provisioning one or more Azure VMs with SQL Server and then adding them as replicas to your on-premises Availability Groups.

    Please refer to this article:

    https://learn.microsoft.com/en-us/previous-versions/azure/virtual-machines/windows/sqlclassic/virtual-machines-windows-classic-sql-onprem-availability

    Hope this can help you well!

    Feel free to share your issues here if you have any concerns.

    Best regards,

    Lucy Chen


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/support/email-notifications


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.