Share via

Experience with SQL2014 to SQL2022 where table column data has been encrypted.

Brian Chandler 0 Reputation points
2025-10-21T09:35:04.7633333+00:00

Have a SQL2014 Express database (instance=COMP) where some columns in a table have been encrypted (using Master Key, Certificate, Symmetric etc).

Have created a SQL2022 database (instance=COMP2022) and Restored into SQL2022 a backup of SQL2014.

Queries that work in SQL2014 which decrypt using (using Master Key, Certificate, Symmetric etc) return no data in SQL2022.

ChatGPT has not been able to help.

I have DROPPED and CREATED keys and certificate, Backed them from SQL2014 and Restored into SQL2022. With no success.

Any suggestions welcomed.

SQL Server Database Engine

Answer recommended by moderator

  1. Ben Miller-(DBADuck) 280 Reputation points MVP
    2025-10-28T22:48:02.8833333+00:00

    Remember that when you have a DATABASE MASTER KEY and copy or move the database to another server, you will need to OPEN MASTER KEY DECRYPTION BY PASSWORD='' in order for the service master key to encrypt that key and be able to open it.

    You will have problems if you do not know the master key password. These passwords for the keys should be put in a safe place to be able to recall them. This holds the key to the encryption hierarchy in SQL Server. The service master key is created by the service and therefore will not be able to open the master key in a database until you open it with the password.

    Was this answer helpful?

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.