Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 DROP SYMMETRIC KEY (Transact-SQL)
Other versions are also available for the following:
SQL Server 2008 Books Online
DROP SYMMETRIC KEY (Transact-SQL)

Removes a symmetric key from the current database.

Topic link icon Transact-SQL Syntax Conventions

DROP SYMMETRIC KEY symmetric_key_name [REMOVE PROVIDER KEY]
symmetric_key_name

Is the name of the symmetric key to be dropped.

REMOVE PROVIDER KEY

Removes an Extensible Key Management (EKM) key from an EKM device. For more information about Extensible Key Management, see Understanding Extensible Key Management (EKM).

If the key is open in the current session the statement will fail.

If the asymmetric key is mapped to an Extensible Key Management (EKM) key on an EKM device and the REMOVE PROVIDER KEY option is not specified, the key will be dropped from the database but not the device, and a warning will be issued.

Requires CONTROL permission on the symmetric key.

The following example removes a symmetric key named GailSammamishKey6 from the current database.

CLOSE SYMMETRIC KEY GailSammamishKey6;
DROP SYMMETRIC KEY GailSammamishKey6;
GO
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker