OPEN SYMMETRIC KEY

Decrypt a symmetric key and makes it available for use.

Syntax:
      OPEN SYMMETRIC KEY Key DECRYPTION BY decrypt_option

decrypt_options:
   CERTIFICATE certificate [WITH PASSWORD = 'password']
   ASYMMETRIC KEY asym_key [WITH PASSWORD = 'password']
   SYMMETRIC KEY decrypting_Key
   PASSWORD = 'decryption_password'

Key:
   certificate   Certificate whose private key will be used to decrypt the symmetric key.
   asym_key      An asymmetric key whose private key will be used to decrypt the symmetric key.
   password    Password that was used to encrypt the private key of the certificate or asymmetric key.
   decrypting_key  Key that will be used to decrypt the key being opened.
   decryption_password    The password that was used to protect the symmetric key.

An open key will continue to be available until it is either explicitly closed or the session is terminated.

If the symmetric key was encrypted with another key, that key must be opened first.

Examples

USE myDB;
OPEN SYMMETRIC KEY SymKeySS64
DECRYPTION BY CERTIFICATE Cert02;
GO

"Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful” ~ Herman Cain

Related commands

CREATE SYMMETRIC KEY
CLOSE SYMMETRIC KEY
ALTER SYMMETRIC KEY
DROP SYMMETRIC KEY
sys.symmetric_keys


 
Copyright © 1999-2024 SS64.com
Some rights reserved