I'm trying to perform a restore of a database from a different server onto my localhost server .That database is encrypted (the bak file ) ,so I have to decrypt it ,that's fine I have all the cert files and the password ,but for some reason I'm still getting the following error :
The certificate, asymmetric key, or private key file is not valid or does not exist; or you do not have permissions for it.
This is the code I'm executing:
CREATE CERTIFICATE [Certificate1] FROM FILE = 'C:\Location of the certs' WITH PRIVATE KEY ( FILE = 'C:\Location of the certs' , DECRYPTION BY PASSWORD = 'password' );
PS. I'm no expert at backups and restores .