Why is it critically important to back up the certificate used for Transparent Data Encryption, and what happens if it is lost?
Short answer
If the certificate used to protect a TDE encrypted database is lost without a proper backup, you will be permanently unable to restore that database's backups or attach its data files on a different server, since the certificate is required to decrypt the database encryption…
Advertisement
AModel answer
If the certificate used to protect a TDE encrypted database is lost without a proper backup, you will be permanently unable to restore that database's backups or attach its data files on a different server, since the certificate is required to decrypt the database encryption key, making a certificate backup just as important as the actual database backups themselves.
BACKUP CERTIFICATE MyServerCert
TO FILE = 'C:\Backups\MyServerCert.cer'
WITH PRIVATE KEY (
FILE = 'C:\Backups\MyServerCert.pvk',
ENCRYPTION BY PASSWORD = 'StrongPassword123!'
);Real-world example
A company that enabled TDE without properly backing up their certificate discovers, after a hardware failure, that their database backups are completely unusable, learning a costly lesson about the absolute necessity of also backing up TDE certificates.
Likely follow-ups
- Where should the certificate backup be stored for maximum safety?
- How do you restore a TDE encrypted database onto a completely different server?
Related topics