Skip to content

Latest commit

 

History

History
73 lines (58 loc) · 2.89 KB

drop-symmetric-key-transact-sql.md

File metadata and controls

73 lines (58 loc) · 2.89 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs monikerRange
DROP SYMMETRIC KEY (Transact-SQL)
DROP SYMMETRIC KEY (Transact-SQL)
VanMSFT
vanto
03/06/2017
sql
t-sql
reference
ignite-2024
DROP SYMMETRIC KEY
DROP_SYMMETRIC_KEY_TSQL
symmetric keys [SQL Server], removing
deleting symmetric keys
encryption [SQL Server], symmetric keys
removing symmetric keys
dropping symmetric keys
cryptography [SQL Server], symmetric keys
DROP SYMMETRIC KEY statement
TSQL
=azuresqldb-current || =azuresqldb-mi-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azure-sqldw-latest || =fabric

DROP SYMMETRIC KEY (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance Synapse Analytics FabricSQLDB]

Removes a symmetric key from the current database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

DROP SYMMETRIC KEY symmetric_key_name [REMOVE PROVIDER KEY]  

Arguments

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 Extensible Key Management (EKM).

Remarks

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.

Permissions

Requires CONTROL permission on the symmetric key.

Examples

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

CLOSE SYMMETRIC KEY GailSammamishKey6;  
DROP SYMMETRIC KEY GailSammamishKey6;  
GO  

See also

CREATE SYMMETRIC KEY (Transact-SQL)
ALTER SYMMETRIC KEY (Transact-SQL)
Encryption Hierarchy
CLOSE SYMMETRIC KEY (Transact-SQL)
Extensible Key Management (EKM)