Does SQL server support database migration using LUN re-pointing for system, user databases across different sql server versions (2016 to 2019)?

Posted on

Question :

I have SQL server 2016 on server A.

I want to migrate to SQL Server 2019 server B. I have installed the SQL server which auto creates the system dbs (master, msdb, model). D drive is for data files and E drive is for log files.

Source and Target sql servers share the same SAN infrastructure.

Now I want to re-point the LUNs from the source server to this server (for D and E drives) to migrate the databases. Upon doing this, the D and E drives on target sql server will be as they were in the source sql server.

  1. Now when I attach the system and user dbs, will the sql server 2019 still work with the system dbs from an older version?
  2. Or is this re-pointing LUN approach only suitable for migration with the same sql version?
  3. Or is this re-pointing LUN approach only suitable for migration of user databases?

Link: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/choose-a-database-engine-upgrade-method?view=sql-server-ver15#migrate-to-a-new-installation

enter image description here

Answer :

Now when I attach the system and user dbs, will the sql server 2019 still work with the system dbs from an older version?

You would not be able to attach system databases of SQL Server 2016 on SQL Server 2019. The user databases would work and get attached and upgraded. There are lots of caveats though.

Or is this re-pointing LUN approach only suitable for migration with the same sql version?

Yes this would work fairly well if the SQL Server version and edition and CU updates ( basically output of select @@version showing version no should match for old and new instance.) are same.

Or is this re-pointing LUN approach only suitable for migration of user databases?

Attaching a system database is risky. What you can do is attach user databases and then move logins, jobs and other objects. There is nothing that beats backup and restore though.

Leave a Reply

Your email address will not be published.