ALTER DATABASE ENCRYPTION KEY
changes a database encryption key
What changes
- Input
- catalog
- Output or change
- security catalog: database encryption key
Syntax at a glance
ALTER DATABASE ENCRYPTION KEY REGENERATE WITH ALGORITHM = { AES_128 | AES_192 | AES_256 | TRIPLE_DES_3KEY } | ENCRYPTION BY SERVER { CERTIFICATE Encryptor_Name | ASYMMETRIC KEY Encryptor_Name } [ ; ]
Work example
A database encryption key needs a planned re-protection or algorithm change.
Confirm the new protector is backed up and test the recovery order before touching encrypted data.
Check your work A restored lab database opens with the new protector and its data remains readable.
Open Microsoft Learn for full syntax, permissions, and details for your version.