| title | managed_backup.sp_backup_master_switch (Transact-SQL) | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 06/10/2016 | ||||
| ms.prod | sql | ||||
| ms.prod_service | database-engine | ||||
| ms.reviewer | |||||
| ms.technology | system-objects | ||||
| ms.topic | language-reference | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | 1ed2b2b2-c897-41cc-bed5-1c6bc47b9dd2 | ||||
| author | MikeRayMSFT | ||||
| ms.author | mikeray |
[!INCLUDEtsql-appliesto-ss2016-xxxx-xxxx-xxx-md]
Pauses or resumes the [!INCLUDEss_smartbackup].
Use this stored procedure to temporarily pause and them resume [!INCLUDEss_smartbackup]. This makes sure that all the configurations settings remain and is retained when the operations resume. When [!INCLUDEss_smartbackup] is paused the retention period is not enforced. This means that there is no check to determine whether files should be deleted from storage or if there are backup file corrupted, or break in log chain.
Transact-SQL Syntax Conventions
EXEC managed_backup.sp_backup_master_switch
[@new_state = ] { 0 | 1} @state
Set the state of [!INCLUDEss_smartbackup]. The @state parameter is BIT. When set to a value of 0 the operations are paused, and when set to a value of 1 the operation resume.
0 (success) or 1 (failure)
Describes security issues related to the statement.Include Permissions as a subsection (H3 heading). Consider including other subsections for Ownership Chaining and Auditing if appropriate.
Requires membership in db_backupoperator database role, with ALTER ANY CREDENTIAL permissions, and EXECUTE permissions on sp_delete_backuphistorystored procedure.
The following example can be used to pause [!INCLUDEss_smartbackup] on the instance it is executed on:
Use msdb;
GO
EXEC managed_backup.sp_backup_master_switch @new_state=0;
Go
The following example can be used to resume [!INCLUDEss_smartbackup].
Use msdb;
GO
EXEC managed_backup.sp_backup_master_switch @new_state=1;
Go