Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CLOSE MASTER KEY (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Closes the master key of the current database.

Applies to: SQL Server (SQL Server 2008 through current version), SQL Database V12 (Preview in some regions), Azure SQL Data Warehouse Public Preview.

Topic link icon Transact-SQL Syntax Conventions

CLOSE MASTER KEY

Takes no arguments.

This statement reverses the operation performed by OPEN MASTER KEY. CLOSE MASTER KEY only succeeds when the database master key was opened in the current session by using the OPEN MASTER KEY statement.

No permissions are required.

USE AdventureWorks2012;
CLOSE MASTER KEY;
GO

Community Additions

ADD
Show:
© 2015 Microsoft