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
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |