Sample Header Ad - 728x90

Certificate restore error: The certificate, asymmetric key, or private key file is not valid or does not exist

0 votes
1 answer
51 views
I am trying to restore a certificate but it gives me above error message. The database is not being stored it was part of TDE encryption, but that was removed earlier. Now how to handle this ?. while restoring database gives this error message.
TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore of database 'PrismBT' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Cannot find server certificate with thumbprint '0x3A4813BD6A61D443D620E43014F46F78F593EB54'. (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17285.0+((SSMS_Rel_17_4).180821-0238)&LinkId=20476 
when I try to restore the certificate using old certificate and private key , I get the above error message. What to do now.? I used below commands in new server
create master key encryption by password = 'password'


Use master
go

create certificate GCRDB1_TDE_Cert 
from File = 'E:\script\GCRDB1_certificate.cer'
with private key (File = 'e:\script\GCRDB1_PKey.pvk',encryption by password = 'password')
Asked by Azhar Hussain (1 rep)
May 30, 2025, 11:12 AM
Last activity: May 30, 2025, 12:02 PM