title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
managed_backup.sp_backup_master_switch (Transact-SQL) |
Pauses or resumes the SQL Server Managed Backup to Microsoft Azure. |
markingmyname |
maghan |
randolphwest |
08/21/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE sqlserver2016]
Pauses or resumes the [!INCLUDE ss-managed-backup].
Use managed_backup.sp_backup_master_switch
to temporarily pause and then resume [!INCLUDE ss-managed-backup]. This procedure makes sure that all the configurations settings remain, and are retained when the operations resume. When [!INCLUDE ss-managed-backup] is paused the retention period isn't enforced.
In other words, there's no check to determine:
- whether files should be deleted from storage
- if there are corrupted backup files
- if there's a break in the log chain.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
EXEC managed_backup.sp_backup_master_switch [ @new_state = ] { 0 | 1 }
[ ; ]
Set the state of [!INCLUDE ss-managed-backup]. @new_state 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).
Requires membership in db_backupoperator database role, with ALTER ANY CREDENTIAL permissions, and EXECUTE permissions on sp_delete_backuphistory
stored procedure.
The following example can be used to pause [!INCLUDE ss-managed-backup] on the instance it's executed on:
USE msdb;
GO
EXEC managed_backup.sp_backup_master_switch @new_state = 0;
Go
The following example can be used to resume [!INCLUDE ss-managed-backup].
USE msdb;
GO
EXEC managed_backup.sp_backup_master_switch @new_state = 1;
Go