Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.59 KB

backup-service-master-key-transact-sql.md

File metadata and controls

65 lines (51 loc) · 2.59 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
BACKUP SERVICE MASTER KEY (Transact-SQL)
BACKUP SERVICE MASTER KEY (Transact-SQL)
VanMSFT
vanto
03/03/2017
sql
t-sql
reference
BACKUP SERVICE MASTER KEY
DUMP_SERVICE_MASTER_KEY_TSQL
DUMP SERVICE MASTER KEY
BACKUP_SERVICE_MASTER_KEY_TSQL
backing up service master keys [SQL Server]
BACKUP SERVICE MASTER KEY statement
cryptography [SQL Server], Service Master Key
exporting Service Master Keys
encryption [SQL Server], Service Master Key
service master key [SQL Server], exporting
TSQL

BACKUP SERVICE MASTER KEY (Transact-SQL)

[!INCLUDE sql-asdbmi]

Exports the service master key.

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

Syntax

BACKUP SERVICE MASTER KEY TO FILE = 'path_to_file'   
    ENCRYPTION BY PASSWORD = 'password'  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Arguments

FILE ='path_to_file'
Specifies the complete path, including file name, to the file to which the service master key will be exported. This may be a local path or a UNC path to a network location.

PASSWORD ='password'
Is the password used to encrypt the service master key in the backup file. This password is subject to complexity checks. For more information, see Password Policy.

Remarks

The service master key should be backed up and stored in a secure, off-site location. Creating this backup should be one of the first administrative actions performed on the server.

Permissions

Requires CONTROL SERVER permission on the server.

Examples

In the following example, the service master key is backed up to a file.

BACKUP SERVICE MASTER KEY TO FILE = 'c:\temp_backups\keys\service_master_key' ENCRYPTION BY PASSWORD = '3dH85Hhk003GHk2597gheij4';  

See Also

ALTER SERVICE MASTER KEY (Transact-SQL)
RESTORE SERVICE MASTER KEY (Transact-SQL)