17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6 – Transparent Data EncryptionBackup before ProceedingIt is a general best practice to backup a database prior to making modifications.However, it is especially important when implementing TDE, in order toensure that, should the TDE implementation need to be reversed, you cancleanly recover the database in its original form.In addition, by performing a database backup, a new checkpoint will beestablished in the transaction log. The creation of a checkpoint truncates allinactive items in your transaction log prior to the new checkpoint. This willensure that your transaction log is free from unencrypted items, prior to theTDE implementation. Listing 6-1 shows the backup command for theHomeLending database.USE HomeLending;GOBACKUP DATABASE HomeLendingTO DISK = 'D:\HomeLending\Backup\HomeLending.bak'WITH NOFORMAT,INIT,NAME = 'HomeLending-Full Database Backup',SKIP,NOREWIND,NOUNLOAD,STATS = 10GOListing 6-1: Backing up the HomeLending database, prior to TDE.With the backup successfully completed, we can begin the process ofimplementing TDE.The Master DatabaseOur first step is to create a database master key for our Master database, usingthe CREATE MASTER KEY method, as shown in Listing 6-2.USE master;GOCREATE MASTER KEYENCRYPTION BY PASSWORD = 'MyStr0ngP@ssw0rd2009';GOListing 6-2: Creating the database master key in the Master database.134

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!