upgrade SQL Server 2016 to SQL Server 2022

Rick Lalonde 0 Reputation points
2025-03-04T20:06:02.4633333+00:00

How to upgrade SQL Server 2016 to SQL Server 2022 in Azure SQL VM

SQL Server on Azure Virtual Machines
{count} votes

1 answer

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 631 Reputation points
    2025-03-04T20:18:51.59+00:00

    Hello @Patrick Lalonde

    This is the guide for this process https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/change-sql-server-version?view=azuresql

    Additionally last time this video help me out; https://www.youtube.com/watch?v=bjUmab3GAvw

    I'm going to resume the process here for you;

    Upgrading SQL Server 2016 to SQL Server 2022 in an Azure SQL VM involves several steps. Here's a detailed guide to help you through the process:

    Prerequisites

    Backup Your Databases: Before starting the upgrade, ensure you have a full backup of all your databases, including system databases (except tempdb).

    Check Compatibility: Verify that your applications and databases are compatible with SQL Server 2022. You can use tools like the Database Experimentation Assistant and Query Tuning Assistant to help with this.

    Obtain Installation Media: Ensure you have the SQL Server 2022 installation media. Customers with Software Assurance can obtain it from the Volume Licensing Center. Alternatively, you can deploy an Azure Marketplace SQL Server VM image with SQL Server 2022 and copy the setup media from it.

    Steps to Upgrade

    1. Delete SQL IaaS Agent Extension: Before upgrading, delete the SQL IaaS Agent extension from your SQL Server VM. You can do this using the Azure portal, PowerShell, or Azure CLI. For example, using PowerShell: powershell
         Remove-AzSqlVM -ResourceGroupName <resource_group_name> -Name <SQL VM resource name>
      
    2. Start SQL Server Setup: Run Setup.exe from the SQL Server 2022 installation media. The Installation Wizard will start.
      • Select "Installation" on the navigation pane.
      • Choose "Upgrade from a previous version of SQL Server."
    3. Follow the Installation Wizard: The wizard will guide you through the upgrade process. Make sure to select the instance of SQL Server 2016 that you want to upgrade.
    4. Complete the Upgrade: Once the upgrade is complete, verify that all databases and applications are functioning correctly.
    5. Reinstall SQL IaaS Agent Extension: After the upgrade, reinstall the SQL IaaS Agent extension to manage your SQL Server VM through the Azure portal.Upgrading SQL Server 2016 to SQL Server 2022 in an Azure SQL VM involves several steps. Here's a detailed guide to help you through the process: Prerequisites
      1. Backup Your Databases: Before starting the upgrade, ensure you have a full backup of all your databases, including system databases (except tempdb).
      2. Check Compatibility: Verify that your applications and databases are compatible with SQL Server 2022. You can use tools like the Database Experimentation Assistant and Query Tuning Assistant to help with this.
      3. Obtain Installation Media: Ensure you have the SQL Server 2022 installation media. Customers with Software Assurance can obtain it from the Volume Licensing Center. Alternatively, you can deploy an Azure Marketplace SQL Server VM image with SQL Server 2022 and copy the setup media from it.
      Steps to Upgrade
      1. Delete SQL IaaS Agent Extension: Before upgrading, delete the SQL IaaS Agent extension from your SQL Server VM. You can do this using the Azure portal, PowerShell, or Azure CLI. For example, using PowerShell: powershell
              Remove-AzSqlVM -ResourceGroupName <resource_group_name> -Name <SQL VM resource name>
        
      2. Start SQL Server Setup: Run Setup.exe from the SQL Server 2022 installation media. The Installation Wizard will start.
        • Select "Installation" on the navigation pane.
        • Choose "Upgrade from a previous version of SQL Server."
      3. Follow the Installation Wizard: The wizard will guide you through the upgrade process. Make sure to select the instance of SQL Server 2016 that you want to upgrade.
      4. Complete the Upgrade: Once the upgrade is complete, verify that all databases and applications are functioning correctly.
      5. Reinstall SQL IaaS Agent Extension: After the upgrade, reinstall the SQL IaaS Agent extension to manage your SQL Server VM through the Azure portal.

    If you found it helpful, could you kindly click the “Accept Answer and upvote” on the post.

    If you have any further queries, please let us know we are glad to help you.


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.