Create certificate from backup fails on SQL Server 2008

This is so going to bite yer ass if you don’t pay attention…

As usual, a very quick post: I tried to create (ok, restore) a certificate from the production server to our DR server, so that the automated restores would work. When I ran the script (yes, CREATE CERTIFICATE … FROM FILE […]), I got this:

Msg 15208, Level 16, State 1, Line 1
The certificate, asymmetric key, or private key file does not exist or has invalid format.

Hm… apart from the usual stuff you would find on the web, I’ll add another one: just make sure that the machine name is the same as the SQL Server (default instance) name. In my case, the computer name displayed: DR20 server, while the SQL Server default instance name was: DR20DB server. Once the SQL Server default instance name was DR20, everything went fine.

I hope this helps some poor soul out there.

Best regards,
io

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.