April 21, 2018 at 8:43 am
Hello everyone
I need to encrypt my backup sql If I start the operation of the backup
I come to have this error
Who has an idea about the root cause of this error
Here is the script I used for creating the certificateCREATE CERTIFICATE Shipping04
ENCRYPTION BY PASSWORD = 'pGFD4bb925DGvbd2439587y'
WITH SUBJECT = 'backup_Encryption',
EXPIRY_DATE = '20301031';
GO
thank you
April 23, 2018 at 2:18 pm
Run the following in master to confirm if your cert is bound to your db SELECT DB_NAME(db.database_id) DbName, db.encryption_state,cer.thumbprint,db.key_algorithm,db.key_length
, encryptor_type, cer.name, cer.expiry_date, cer.subject
FROM sys.dm_database_encryption_keys db INNER JOIN sys.certificates cer
ON db.encryptor_thumbprint = cer.thumbprint
April 23, 2018 at 5:04 pm
Hopefully you didn't just publish a real password. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
April 24, 2018 at 8:35 am
joujousagem2006 1602 - Saturday, April 21, 2018 8:43 AMHello everyone
I need to encrypt my backup sql If I start the operation of the backup
I come to have this error
Who has an idea about the root cause of this error
Here is the script I used for creating the certificateCREATE CERTIFICATE Shipping04
ENCRYPTION BY PASSWORD = 'pGFD4bb925DGvbd2439587y'
WITH SUBJECT = 'backup_Encryption',
EXPIRY_DATE = '20301031';
GO
thank you
SQL Server is doing exactly what you told it to do 😉
Sadly, you told the database engine when creating the certificate, do not protect the private key with the database master key
use a password instead. This would be a little more what you're probably after
use master
go
CREATE CERTIFICATE Shipping04 AUTHORIZATION [someuser]
WITH SUBJECT = 'backup_Encryption',
EXPIRY_DATE = '20301031'
Or alter the certificate to use DMK using
ALTER CERTIFICATE Shipping04
WITH PRIVATE KEY (DECRYPTION BY PASSWORD = 'pGFD4bb925DGvbd2439587y')
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply