Best method to upgrade SQL to new version and remove older versions

Daniel Andryszak 121 Reputation points
2025-06-20T20:24:01.47+00:00

We have several Windows servers that have multiple versions of SQL Server installed.

A few servers are running SQL Server 2012, 2014 and 2016 (at least there are components from each build).

IinfoSec would like the old versions removed for auditing purposes.

Currently, I upgrade the version to SQL Server 2022, backup up the database, shutdown SQL server and move the system database to another folder, uninstall all versions of SQL Server, verify all is clean, install SQL Server 2022, shutdown services, move system databases to another folder, replace system databases with original upgrade databases, start services, verify operation. A tedious process and it works, but there has to be a better way.

What is the best method to upgrade, then remove the older version

SQL Server Database Engine
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2025-06-20T20:58:19.72+00:00

    As long as you are staying on the same hardware, the easiest way it to make an in-place upgrade. That may not remove exactly all files from the old versions, but for all practical matters you are now on the new version.

    Doing like you do now seems complicated to me, since you have to install a new instance which typically has repercussions for client.

    In many cases, when people are upgrading SQL Server, they also move to new hardware. In this case you make a clean install on a new machine, and you copy user databases to the new server with BACKUP/RESTORE. For master and msdb, I would be more inclined to script what I need (i.e. logins and jobs) to the new machine, rather than copying the full databases.

    I should add that when you make an in-place upgrade, you should be sure to have backups on operating-system level, so that you can restore if things go south. If these machines are VMs, make sure that you have a fresh backup of the entire VM.

    0 comments No comments

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.