Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

How to fix Warning: The certificate you created is expired

08 April,2022 by Tom Collins

Question : When recovering a certificate created during a CREATE CERTIFICATE I get a "Warning: The certificate you created is expired" message , although the certificate is added to the server. Is this an issue? how can I fix?


FROM FILE = 'C:\temp\mycert.cert'
WITH PRIVATE KEY (FILE = 'C:\temp\mycert.key',DECRYPTION BY PASSWORD = 'My!!Strongpassword' );

Warning: The certificate you created is expired.

Answer:  This warning messages comes up when there is an attempt to recover a certificate which has an expiry_date older than the current server's date & time.  

The typical situation is you've backed up a certificate on SERVER1 and want to migrate the cert to SERVER2. Usually for the purpose of recovering a TDE enabled database from SERVER1 onto SERVER2. 

Don't panic! SQL Server will bypass the expiry date when considering a BACKUP or RESTORE procedure.    

If you need to update the expiry date you will need to go through the CREATE CERTIFICATE steps and reissue the certificate . 

To check the expiry_date use use the certificate queries on A guide to setup TDE for SQL Server




Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on How to fix Warning: The certificate you created is expired | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer