I followed this article and everything went fine untill I tried to create the certificate on the second instance.
(Both instances on the same server both with different windows users as service accounts)
CREATE CERTIFICATE TDECertificate
FROM FILE = 'E:\MSSQL10.MSSQLSERVER\MSSQL\Backup\Certificate_EncryptionKey\TDECertificate.cert'
WITH PRIVATE KEY (
FILE = 'E:\MSSQL10.MSSQLSERVER\MSSQL\Backup\Certificate_EncryptionKey\TDE_Certificate_DYNAMICS.key',
DECRYPTION BY PASSWORD = ‘xxxxxxxx’)
I get the following:
The certificate, asymmetric key, or private key file does not exist or has invalid format.
My server OS is Windows 2008 R2.
Sql version 2008 R2
Eventually I found that the service account of the second SQL instance received a "access denied" error on the "certificate" and private key" files. Giving the service account of the second instance full control NTFS rights on this files fixed my problem. (Maybe read only rights would have been enough.)