RESTORE MASTER KEY

Import a database master key from a backup file.

Syntax
      RESTORE MASTER KEY FROM FILE = 'path_to_file' 
      DECRYPTION BY PASSWORD = 'password'
      ENCRYPTION BY PASSWORD = 'password'
      [FORCE]

FORCE will continue the restore process even if the current database master key is not open, or if some of the encrypted private keys cannot be decrypted.

This encryption/decryption is a resource-intensive operation.

Example

RESTORE MASTER KEY 
FROM FILE = 'c:\my_backup_master_key'
DECRYPTION BY PASSWORD = '6464hxJDWHO64H#64n77'
ENCRYPTION BY PASSWORD = '98yiugh87JJODsdigh9';
GO

"What man has written, man may read
But God fills every root and seed
With cryptic words, to strangely set
For mortal to decipher yet" - Charles William Dalmon

Related:

CREATE MASTER KEY
ALTER MASTER KEY
BACKUP MASTER KEY
DROP MASTER KEY
Password generator
Equivalent Oracle command: DROP PROFILE


© Copyright SS64.com 1999-2014
Some rights reserved