Asked by:
Managed backup configuration not succeeding

Question
-
Hi,
When trying to set up managed backup to Azure, I get error. I've went through different blogs and Technet articles discussing this, but non seem to work. I'm using SQL 2016 RTM (but same occurred on preview versions as well).
First I create SAS using CloudXplorer, and it looks something like this:
https://XXXXX.blob.core.windows.net/sql/?sv=2015-04-05&sr=c&si=sqlbackup&sig=XXXXXXXXXXXXXXXXX%2F3PvaAfr%2FIvOI%3D That URL in itself doesn't work when testing with browser, but appending few querystrings (&comp=list&restype=container) and it works fine and displays blob container contents just fine.
Then I create credential like:
CREATE CREDENTIAL [https://XXXXX.blob.core.windows.net/sql]
WITH IDENTITY='SHARED ACCESS SIGNATURE',
SECRET='sv=2015-04-05&sr=c&si=sqlbackup&sig=XXXXXXXXXXXXXXXXX%2F3PvaAfr%2FIvOI%3D'
And finally try to configure the managed backup using command:
Use msdb;
GO
EXEC msdb.managed_backup.sp_backup_config_basic
@enable_backup = 1,
@database_name = NULL,
@container_url = 'https://XXXXX.blob.core.windows.net/sql',
@retention_days = 14
GObut it throws error:
Msg 45207, Level 17, State 6, Procedure sp_add_task_command, Line 102 [Batch Start Line 11]
SQL Server Managed Backup to Microsoft Azure cannot configure the default backup settings for the SQLServer instance because the container URL was invalid. It is also possible that your SAS credential is invalid.
I've tried several different combinations and changing the @container_url and the credential URL, but I always get this error.
Any tips?
- Edited by Jussi Palo Tuesday, June 14, 2016 1:39 PM
Tuesday, June 14, 2016 1:38 PM
All replies
-
Can you run the below query and see the the column is_managed_backup enabled or not
Use msdb
GO
SELECT * FROM smart_admin.fn_backup_db_config (NULL)
Regards,
Rama
Wednesday, June 15, 2016 3:38 AM -
It returns 0 rows, which is something I'd expect as the initial configuration fails already.
- Edited by Jussi Palo Tuesday, June 21, 2016 3:59 PM
Tuesday, June 21, 2016 3:41 PM -
Anyone?Monday, June 27, 2016 12:11 PM
-
Yeah. The Books Online article for how to generate the SAS key needs updating.
Here's a sample Powershell Azure Resource Manager script to do it.
Resource Manager Powershell Script to Enable SQL Server Managed Backup to Azure
David
Monday, June 27, 2016 1:51 PM