Skip to main content

Does anyone have experience in doing an in-place upgrade of Windows Server from 2012R2 to 2019 on their SQL box? We have not touched DB encryption at all and are concerned that there may be issues in decrypting the data after the OS upgrade. Is encryption performed by a machine key and would this change during an OS upgrade?

Hi, Do you really mean upgrade the OS under SQL Server?

I haven't done that, but I've migrated K2 databases to the new SQL Server several times. Installing the newer SQL server on the new OS is IMHO safer than doing an in-place OS upgrade of the old SQL.
1. I think it is ideal to have a client SQL alias on the K2 server, so you don't have to change anything in the K2 configuration itself, and just change the SQL server name in the alias settings.
2. And I solved the data encryption in the K2 database by backing up and restoring the Service Master Key between SQL servers. Mike Rodionov's article will help, see https://www.starwindsoftware.com/blog/migrating-k2-database-to-a-different-sql-server-instance-how-to-copy-sql-server-instance-master-key
3. Then copy the logins and the K2 database to the new SQL server, perhaps using the great PowerShell module dbatools.
And then you can usually just turn on the stopped K2 services.
If something goes wrong, you can connect K2 back to the original SQL just by changing the server in the SQL alias.


Yes, I do mean OS upgrade under the SQL instances, but thank you for your input and especially the reference to that article, which I’ve found very useful.

In case the OS upgrade doesn’t work, we do have the option to roll-back through VM snapshot, in which case I will refer back to your answer to guide us.

 


Reply