With the introduction of transparent data encryption (TDE) in SQL Server 2008, users now have the opportunity of full database-level encryption by using TDE. TDE is the optimal choice for bulk encryption to meet regulatory compliance or corporate data security standards. TDE works at the file level which encrypts data directly on the hard drive. TDE does not replace the column-level encryption. It is just another way of encrypting data of your database transparently. The next steps will guide you on how to enable TDE with the CryptoServer SQLEKM provider.
First of all, a credential for TDE has to be created (see 2021-0004 Setting up Credentials).
SQL Statement
|
Create an asymmetric key used as TDE KEK (Key Encryption Key) in the master database (see 2021-0004 Creating Keys).
SQL Statement
|
Create a SQL Server login account from this asymmetric key:
SQL Statement
|
Link your SQL Server credential to your just created user account with the next statement:
SQL Statement
|
Switch to your database to be encrypted with TDE. In our example we create a database named demo first:
SQL Statement
|
Create a database encryption key, in this example based on an AES algorithm.
SQL Statement
|
Enable the transparent data encryption and start encryption of the database as a background thread. Depending on the size of the database it can take a while until the encryption has been completed.
SQL Statement
|
To see the current state of the encryption, use the next SQL statement.
SQL Statement
|