Skip to content

Latest commit

 

History

History
74 lines (60 loc) · 2.88 KB

drop-certificate-transact-sql.md

File metadata and controls

74 lines (60 loc) · 2.88 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs monikerRange
DROP CERTIFICATE (Transact-SQL)
DROP CERTIFICATE (Transact-SQL)
VanMSFT
vanto
06/18/2018
sql
t-sql
reference
ignite-2024
DROP CERTIFICATE
DROP_CERTIFICATE_TSQL
certificates [SQL Server], removing
removing certificates
dropping certificates
DROP CERTIFICATE statement
deleting certificates
TSQL
=azuresqldb-current || =azuresqldb-mi-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azure-sqldw-latest || =fabric

DROP CERTIFICATE (Transact-SQL)

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

Removes a certificate from the database.

Important

A backup of the certificate used for database encryption should be retained even if the encryption is no longer enabled on a database. Even though the database is not encrypted anymore, parts of the transaction log may still remain protected, and the certificate may be needed for some operations until the full backup of the database is performed. The certificate is also needed to be able to restore from the backups created at the time the database was encrypted.

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

[!INCLUDEsynapse-analytics-od-unsupported-syntax]

Syntax

DROP CERTIFICATE certificate_name  

Arguments

certificate_name
Is the unique name by which the certificate is known in the database.

Remarks

Certificates can only be dropped if no entities are associated with them.

Permissions

Requires CONTROL permission on the certificate.

Examples

The following example drops the certificate Shipping04 from the AdventureWorks database.

USE AdventureWorks2022;  
DROP CERTIFICATE Shipping04;  

Examples: [!INCLUDEssPDW]

The following example drops the certificate Shipping04.

USE master;  
DROP CERTIFICATE Shipping04;  

See Also

BACKUP CERTIFICATE (Transact-SQL)
CREATE CERTIFICATE (Transact-SQL)
ALTER CERTIFICATE (Transact-SQL)
Encryption Hierarchy
EVENTDATA (Transact-SQL)