Skip to content

Latest commit

 

History

History
78 lines (63 loc) · 2.71 KB

File metadata and controls

78 lines (63 loc) · 2.71 KB
title DROP MASTER KEY (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/06/2017
ms.prod sql
ms.prod_service sql-data-warehouse, pdw, sql-database
ms.reviewer
ms.technology t-sql
ms.topic language-reference
f1_keywords
DROP MASTER KEY
DROP_MASTER_KEY_TSQL
dev_langs
TSQL
helpviewer_keywords
removing Database Master Keys
database master key [SQL Server], removing
encryption [SQL Server], Database Master Key
DROP MASTER KEY statement
cryptography [SQL Server], Database Master Key
dropping Database Master Keys
deleting Database Master Keys
ms.assetid 5ccef797-408f-4964-80da-965d8e1ccba7
author VanMSFT
ms.author vanto
monikerRange >=aps-pdw-2016||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current

DROP MASTER KEY (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-asdb-asdw-pdw-md]

Removes the master key from the current database.

Topic link icon Transact-SQL Syntax Conventions

Syntax

DROP MASTER KEY  

Arguments

This statement takes no arguments.

Remarks

The drop will fail if any private key in the database is protected by the master key.

Permissions

Requires CONTROL permission on the database.

Examples

The following example removes the master key for the AdventureWorks2012 database.

USE AdventureWorks2012;  
DROP MASTER KEY;  
GO  

Examples: [!INCLUDEssSDWfull] and [!INCLUDEssPDW]

The following example removes the master key.

USE master;  
DROP MASTER KEY;  
GO  

See Also

CREATE MASTER KEY (Transact-SQL)
OPEN MASTER KEY (Transact-SQL)
CLOSE MASTER KEY (Transact-SQL)
BACKUP MASTER KEY (Transact-SQL)
RESTORE MASTER KEY (Transact-SQL)
ALTER MASTER KEY (Transact-SQL)
Encryption Hierarchy