Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 7696

Noob with TDE encryption problem

$
0
0

I'm not a SQL guy, but I was tasked with creating a TDE instance on a dev server a few months ago.

I created the new instance and ran

USE master;
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'asdfasdfasdfare23rfyf89werf9fer8c9c8wer9ch89ch9sds';
go
CREATE CERTIFICATE MyServerCertificate WITH SUBJECT = 'My Certificate';
go

USE MyDatabaseName;
GO
CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_128 ENCRYPTION BY SERVER CERTIFICATE MyServerSCertificate;
GO
ALTER DATABASE [MyDatabaseName] SET ENCRYPTION ON;
GO

--Warning: The certificate used for encrypting the database encryption key has not been backed up. You should immediately back up the certificate and the private key associated with the certificate. If the certificate ever becomes unavailable or if you must restore or attach the database on another server, you must have backups of both the certificate and the private key or you will not be able to open the database.
OPEN MASTER KEY DECRYPTION BY PASSWORD = '23987hxJKL969#ghf0%94467GRkjg5k3fd117r$$#1946kcj$n44nhdlj'
BACKUP MASTER KEY TO FILE = 'C:\Projects\SQL\My_Exported_MasterKey'
       ENCRYPTION BY PASSWORD = 'ThisIsMyPa55word!';
GO

Everything went fine, the db is encrypted. I've since been told that we're going to move the db to production, and I'm unable to find the certificate or key.

What can I do?


Viewing all articles
Browse latest Browse all 7696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>