Hi people, I've got the following problem. We had our instance of SQL setup for SQL 2012 CTP3 on our dev environment. Now that SQL 2012 is out, we uninstalled the previous instance. Now that I have sql installed i'm trying to reattach some of the databases. I have the following items : Certificate, Password and Private key. When I try and run the following script i am getting the error : USE MASTER GO CREATE CERTIFICATE CERTIFICATE FROM FILE = 'C:\Users\me\Desktop\TDE\Certificate.cer' WITH PRIVATE KEY (FILE = 'C:\Users\me\Desktop\TDE\Private_Key.pvk', DECRYPTION BY PASSWORD = 'password'); The certificate, asymmetric key, or private key file is not valid or does not exist; or you do not have permissions for it. Can someone please help me with what i'm missing? Thanks... Update : I have been messing around with permissions etc. I have now managed to create my certificate from the files, but i still cannot attach the database. I am getting Cannot find server certificate with thumbprint '0xD7AABE7C1B2A50A85BEC01AC5F204B77339492AC'. I'm giving up... i think somehow we've got a certificate mix up... thanks for your help anyway, off to create a new dev environment and backup certificates!
Not sure if this will fix it, but you are missing the "\\" in the path for the certificate & key. That might have been just a formatting thing when you posted the question. USE MASTER GO CREATE CERTIFICATE CERTIFICATE FROM FILE = 'C:\UsersmeDesktopTDECertificate.cer' WITH PRIVATE KEY (FILE = 'C:\UsersmeDesktopTDEPrivate_Key.pvk', DECRYPTION BY PASSWORD = 'password'); Hope this helps!