SQL Arc to Azure SQL MI migration through MI Link - Failed

Batuhan Yildiz 0 Reputation points Microsoft Employee
2025-11-27T20:48:47.2366667+00:00

Link creation has failed because of the following reason(s): Failed to join distributed availability group DAG_Northwind.Join DAG operation on /subscriptions/641738ea-7ea3-49b3-ae56-775f0b40451a/resourceGroups/rg-sqlmi01/providers/Microsoft.Sql/managedInstances/azsqlmidevtest01/distributedAvailabilityGroups/DAG_Northwind failed Response Status: InternalServerError; Content: {"error":{"code":"InternalServerError","message":"An unexpected error occured while processing the request. Tracking ID: 'f96c311a-2c5d-4b4f-ab8f-ef78418c1107'"}}

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-27T20:48:52.51+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error you encountered during the link creation process indicates that there was an unexpected internal server error while trying to join the distributed availability group (DAG). This can occur due to various reasons, such as network issues, configuration problems, or transient errors in the Azure infrastructure.

    To troubleshoot this issue, consider the following steps:

    1. Check Network Connectivity: Ensure that there are no network issues between the SQL Server and the Azure SQL Managed Instance.
    2. Review Configuration: Verify that the distributed availability group is correctly configured and that all required settings are in place.
    3. Retry the Operation: Sometimes, transient errors can occur. Attempt to recreate the link after some time.
    4. Check Azure Service Health: Look for any ongoing issues with Azure services that might be affecting your resources.
    5. Contact Support: If the issue persists, consider reaching out to Azure support with the provided tracking ID for further assistance.

    These steps should help you identify and resolve the issue with the link creation.

    0 comments No comments

  2. VRISHABHANATH PATIL 1,820 Reputation points Microsoft External Staff Moderator
    2025-12-02T06:28:44.5833333+00:00

    Hi

    Thank you for reaching out to Microsoft QA. Below are the step-by-step mitigation actions to help you resolve the reported issue.

    Verify prerequisites

      - Ensure the source SQL Server is on a supported version and cumulative update for MI Link.
      
         - Confirm the Azure SQL Managed Instance (MI) update policy matches the required level.
         
            - For Arc-enabled SQL, check the Azure extension version is current.
            
    

    Check network connectivity

      - Open outbound connectivity from the MI subnet to the SQL Server mirroring endpoint on TCP 5022.
      
         - Also allow TCP 11000–11999 for distributed availability group traffic.
         
            - Validate DNS resolution and firewall rules on both sides.
            
    

    Validate certificates and endpoints

    • Confirm that the mirroring endpoint certificates are correctly exchanged between SQL Server and MI.
    • Ensure the partner endpoint URL in the DAG configuration matches the AG listener name or IP.

    Clean up any stale DAG objects

    • If a previous attempt created DAG_Northwind, remove it from both MI and SQL Server before retrying.
    • This avoids conflicts during re-creation.

    Confirm configuration alignment

    • The availability group should contain only one database for MI Link.
    • DAG and AG names must match the expected roles.
    • Use the SSMS MI Link wizard for configuration to prevent parameter mismatches.

    Retry link creation

    After completing the above checks, re-initiate the MI Link setup using the recommended wizard or documented steps.

    Reference KB Articles

    0 comments No comments

  3. Batuhan Yildiz 0 Reputation points Microsoft Employee
    2025-12-03T15:59:58.0766667+00:00

    I was already using AG on the nodes and 5022 were dedicated to that port. I updated the port to 5023 for the existing AG endpoints and then tried again and I was able to make it. I missed the point that DAG is only using 5022.
    Thanks


Your answer

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