Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

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?

 

USE MASTER
GO
CREATE CERTIFICATE MyCert_1234567
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 (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

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

Working...
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.

Working...

Post a comment on How to fix Warning: The certificate you created is expired


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer