|
ALTER MASTER KEY
Alter properties of a database master key.
Syntax: ALTER MASTER KEY [FORCE] REGENERATE WITH ENCRYPTION BY PASSWORD = 'password' ALTER MASTER KEY ADD ENCRYPTION BY [SERVICE MASTER KEY | PASSWORD = 'password'] ALTER MASTER KEY DROP ENCRYPTION BY [SERVICE MASTER KEY | PASSWORD = 'password']
REGENERATE - re-create the database master key and all the keys it protects.
FORCE - continue even if the master key is unavailable or the server cannot decrypt all the encrypted private keys.
ADD ENCRYPTION BY SERVICE MASTER KEY - Will store an encrypted copy of the master key in both the current database and in master.
Example
USE MyDatabase;
ALTER MASTER KEY REGENERATE WITH ENCRYPTION BY PASSWORD = '6464hxJDWHO64H64n77';
GO
"Technical skill is mastery of complexity while creativity is mastery of simplicity" - E. Christopher Zeeman (Catastrophe Theory)
Related Commands:
CREATE MASTER KEY
BACKUP MASTER KEY
DROP MASTER KEY
RESTORE MASTER KEY
sys.symmetric_keys
sys.databases