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 EncryptionUSE master;GORESTORE DATABASE HomeLendingFROM DISK = 'D:\HomeLending\Backup\HomeLending.bak'WITH FILE = 1,NOUNLOAD,REPLACE,STATS = 10;GODROP CERTIFICATE MasterCert;GODROP MASTER KEY;GO-- Restart Instance Though SQL Server Management Studio:-- Right-Click instance and click on "Restart" option.Listing 6-12: Reversing TDE when no transactions have occurred.If the request to reverse the implementation of TDE comes after transactionshave occurred, or a copy of the pre-TDE backup file is no longer available, thefollowing steps can be performed:1. Alter the HomeLending database to have the ENCRYPTION option setto the value of OFF.2. Wait until the decryption process is complete. Use thesys.dm_database_encryption_keys DMV to determine itsstatus. A value of "1" returned in the encryption_status columnindicates that the decryption is complete.3. Drop the database encryption key for the HomeLending database.4. Restart the instance in which the HomeLending database resides. Ifthere are not any other user databases on the instance that have TDEimplemented, this action will force the recreation of the TempDBdatabase in an unencrypted format.Listing 6-13 shows the code to implement these steps.USE HomeLending;GOALTER DATABASE HomeLendingSET ENCRYPTION OFF;GO145

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

Saved successfully!

Ooh no, something went wrong!