Getting error in sql server 2022

  • Hi folks

    We have migrated database from sql server 2014 std to sql server 2022 std. database get restored and old server is sql service is stopped.

    Now after few initial operation we are facing this error "Please create master key in the database or open master key in session"

    as checked on net restored database is encrypted by database master key but we donot know its password

    Any suggestion how to proceed ahead with any loss of data

  • Your issue happens because the restored database has encrypted objects that need the master key. Since you don’t have the original password, try this:

    First, check if the master key exists with SELECT * FROM sys.symmetric_keys WHERE name = ##MS_DatabaseMasterKey##.

    If it does, try OPEN MASTER KEY DECRYPTION BY PASSWORD = your_password. If you don’t know it, you’ll need to restore it from a backup using RESTORE MASTER KEY FROM FILE = path_to_backup DECRYPTION BY PASSWORD = old_password ENCRYPTION BY PASSWORD = new_password. If no backup exists, create a new master key with CREATE MASTER KEY ENCRYPTION BY PASSWORD = new_secure_password, but be aware that you might need to re-encrypt dependent objects.

  • @zacharyfull:

    Is it SSISDB by any chance?

    =======================================================================

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply