Transparent Data Encryption (TDE) secures data and log files on disk by encrypting them automatically without changing application code.
Disk-level threats expose databases to theft or unauthorized copies. Transparent Data Encryption (TDE) encrypts MDF, NDF, and LDF files, satisfying PCI-DSS, HIPAA, and GDPR requirements with minimal configuration.
TDE uses a database encryption key (DEK) stored in the boot record. The DEK encrypts pages as they move to disk and decrypts them in memory, so queries on tables like Customers
or Orders
remain unchanged.
SQL Server Enterprise (or Azure SQL Database), CONTROL SERVER & ALTER ANY DATABASE permissions, and a secure location to back up the certificate and private key.
Create a master key in master
, then generate a server certificate. Back up both objects immediately to prevent data-loss scenarios.
Generate the DEK inside EcommerceDB
, specify AES_256
, and turn encryption on. SQL Server starts encrypting pages in the background while the database stays online.
Query sys.databases
or sys.dm_database_encryption_keys
. A status of 3
(encrypted) confirms that all objects, including Products
and OrderItems
, are protected on disk.
Always back up the certificate and its private key along with regular database backups. During restore to another server, create the master key, restore the certificate, then restore the database.
Rotate certificates periodically, store key backups off-site, monitor encryption state, and test restores routinely.
Most workloads see under 5 % overhead because encryption and decryption occur at the page level in memory. Benchmark before production rollout.
TDE is database-wide. If you need column-level encryption, use Always Encrypted instead.
No. On-premises TDE requires Enterprise Edition. Azure SQL Database includes TDE by default.