A backup from a TDE protected database can be perfectly healthy and still fail to restore on a new server. The target lacks the certificate that protects the database encryption key. Move that certificate and its private key through a secure path before starting the restore.

Understand the Two Pieces of a TDE Protected Database
Transparent Data Encryption encrypts database files and backups through a database encryption key. That key is protected by a server certificate or another supported protector in master. The backup alone is not enough for a different instance to open the encrypted database. The destination needs the matching certificate and its private key. The certificate thumbprint helps identify the right one.
I treat the certificate backup as a recovery asset equal in importance to the database backup. If the key material is missing after the source server is gone, a normal restore cannot reconstruct it. Which off-host location holds both files, and has the team practiced recovering them?
Identify the Protecting Certificate
On the source, inspect the database encryption key and join its thumbprint to the certificates in master. Record the database name, thumbprint, certificate name, expiry information, and backup location in a protected runbook. A server can have several TDE certificates, especially after rotation. Do not export a certificate merely because its name looks familiar.
USE master;
GO
SELECT DB_NAME(k.database_id) AS database_name,
k.encryption_state_desc, k.encryptor_type,
k.encryptor_thumbprint, c.name AS certificate_name,
c.expiry_date
FROM sys.dm_database_encryption_keys AS k
LEFT JOIN sys.certificates AS c
ON c.thumbprint = k.encryptor_thumbprint
WHERE k.database_id = DB_ID(N'SalesArchive');Replace the database name. The DMV needs the applicable server permission. A NULL certificate name can indicate a different protector or missing metadata visibility. Stop and verify the actual encryption configuration before following the certificate steps blindly.
Back Up Certificate and Private Key
On the source, back up the identified certificate to a .cer file and its private key to a separate .pvk file protected by a strong password. Store the password separately in the organization's secrets system. Limit file access and remove temporary copies after the tested transfer. The SQL Server service account needs write access to the target path.
USE master;
GO
BACKUP CERTIFICATE SalesTdeCert
TO FILE = 'D:\SecureTransfer\SalesTdeCert.cer'
WITH PRIVATE KEY
(
FILE = 'D:\SecureTransfer\SalesTdeCert.pvk',
ENCRYPTION BY PASSWORD = 'ReplaceWith-Private-Key-Passw0rd'
);These are example Windows paths and placeholders. Use an approved protected directory, not a general downloads folder. Verify that both files were created and can be recovered from the backup system. The private key password is required when importing on the target; the certificate file alone is insufficient.
Prepare master on the Target
On the destination instance, create a database master key in master if one does not already exist. It protects the imported certificate's private key. Use a strong password managed outside the script. Then import the source certificate with its private key and the password used during backup. The certificate's name on the target can differ, but its key and thumbprint must match.
USE master;
GO
-- Only if master has no database master key:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'ReplaceWith-Master-Key-Passw0rd';
GO
CREATE CERTIFICATE SalesTdeCert
FROM FILE = 'D:\SecureTransfer\SalesTdeCert.cer'
WITH PRIVATE KEY
(
FILE = 'D:\SecureTransfer\SalesTdeCert.pvk',
DECRYPTION BY PASSWORD = 'ReplaceWith-Private-Key-Passw0rd'
);
GO
SELECT name, thumbprint FROM sys.certificates
WHERE name = N'SalesTdeCert';Check for an existing master key before running the first statement. The target SQL Server service account needs read access to the transfer files. Verify the imported thumbprint against the source record. A similarly named certificate with a different thumbprint will not unlock this backup.

Restore the TDE Protected Database Through Its Backup Chain
After the certificate is installed, inspect the backup with RESTORE HEADERONLY and RESTORE FILELISTONLY, then build the correct full, differential, and log restore sequence. Use MOVE for data and log paths that differ on the target. The example shows a single full backup; adapt it to the real chain and destination paths.
RESTORE FILELISTONLY
FROM DISK = 'D:\BackupTransfer\SalesArchive_full.bak';
GO
RESTORE DATABASE SalesArchive
FROM DISK = 'D:\BackupTransfer\SalesArchive_full.bak'
WITH MOVE 'SalesArchive' TO 'E:\SQLData\SalesArchive.mdf',
MOVE 'SalesArchive_log' TO 'F:\SQLLog\SalesArchive_log.ldf',
RECOVERY, STATS = 5;Logical file names must come from FILELISTONLY. Do not add WITH REPLACE to force a conflicting restore without a separately approved overwrite decision. A certificate error means the protector is still missing or mismatched; recheck thumbprints and private key import instead of disabling TDE on the source.
Verify and Keep the Recovery Set Together
On the target, check sys.dm_database_encryption_keys for the restored database and confirm encrypted state and expected thumbprint. Run DBCC CHECKDB according to the recovery plan and perform an application-level read. Confirm the service account, logins, jobs, and dependencies needed for use on the new instance. A database restored successfully can still be unusable to the application.
SELECT DB_NAME(database_id) AS database_name,
encryption_state_desc, encryptor_type,
encryptor_thumbprint
FROM sys.dm_database_encryption_keys
WHERE database_id = DB_ID(N'SalesArchive');Keep a checklist that pairs each backup chain with the certificate version, private-key backup, password recovery location, and last test restore. Rotate certificates with a plan for old backups, because older backup sets can still need an older protector. I test the full procedure on a separate instance before an emergency asks me to trust the checklist.
Protect the Transfer Chain
The certificate backup and private key are sensitive because together with the password they can unlock copies of the encrypted database. Transfer them through an approved secure channel, verify file integrity at the destination, and restrict access to the service account and the small recovery team. Do not leave them indefinitely in a staging directory on the SQL Server. Keep durable copies in the organization's protected recovery store, and test that store independently of the source server.
A backup job should not report complete disaster recovery merely because it wrote a .bak file. Pair the backup with the correct protector version in the inventory. Certificate rotation creates a common trap: the latest certificate can protect current files, while an older backup still needs the earlier certificate. Retain old protectors for as long as dependent backups remain in the retention window. Check every backup tier, including off-site archives, before retiring a certificate or its recovery password.
Test a TDE Protected Database Restore Before It Is Needed
Practice restoring to a nonproduction instance with no preinstalled source certificate. That proves the documented import steps, password recovery, and file permissions. Record the exact error so an on-call DBA can recognize it. Without the certificate, restoring a TDE protected database stops with error 33111, Cannot find server certificate with thumbprint. After importing, repeat the restore and compare the source and target thumbprints. A successful test provides much stronger assurance than checking that the certificate files exist.
Related reading on this blog: Transparent Data Encryption and Frequently Asked Questions and AlwaysOn AG (Availability Group) and TDE Error: Please Create a Master Key.

A TDE backup is not portable alone, it is recoverable with its matching protector.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.




