Export (0) Print
Expand All
Expand Minimize

DROP ASYMMETRIC KEY (Transact-SQL)

Removes an asymmetric key from the database.

Topic link icon Transact-SQL Syntax Conventions


DROP ASYMMETRIC KEY key_name

key_name

Is the name of the asymmetric key to be dropped from the database.

An asymmetric key with which a symmetric key in the database has been encrypted, or to which a user or login is mapped, cannot be dropped. Before you drop such a key, you must drop any user or login that is mapped to the key. You must also drop or change any symmetric key encrypted with the asymmetric key. You can use the DROP ENCRYPTION option of ALTER SYMMETRIC KEY to remove encryption by an asymmetric key.

Metadata of asymmetric keys can be accessed by using the sys.asymmetric_keys catalog view. The keys themselves cannot be directly viewed from inside the database.

Requires CONTROL permission on the asymmetric key.

The following example removes the asymmetric key MirandaXAsymKey6 from the AdventureWorks database.

USE AdventureWorks;
DROP ASYMMETRIC KEY MirandaXAsymKey6;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft