Skip to content

Latest commit

 

History

History
83 lines (67 loc) · 2.71 KB

File metadata and controls

83 lines (67 loc) · 2.71 KB
title DROP MASTER KEY (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/06/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
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
caps.latest.revision 34
author BYHAM
ms.author rickbyh
manager jhubbard

DROP MASTER KEY (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-asdw-pdw_md]

Removes the master key from the current database.

Topic link icon Transact-SQL Syntax Conventions

Syntax

-- Syntax for SQL Server, Azure SQL Data Warehouse, Parallel Data Warehouse  
  
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