SQL server 2014 - Restore database from Azure blob

Hello everyone,

I'm trying to restore the database from the SQL Blob storage using following T-SQL script.

RESTORE DATABASE AdventureWorks FROM URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012.bak'
WITH
CREDENTIAL = 'mycredential'
,NORECOVERY
--,REPLACE
,STATS = 5;
GO

However, while doing so I'm getting the following error.

"It was originally formatted with sector size 512 and is now on a device with sector size 65536"

Can anybody please advise how to get rid of this problem?

It's really urgent, any help would be much apprec

September 11th, 2015 2:30am

Hi Ankit,

I suggest you to back-up the database again and then try to restore it if possible. It seems that your backups on the existing file appear to have been created using a BLOCKSIZE of 512 bytes.

Ref:https://msdn.microsoft.com/en-us/library/jj852091(v=sql.120).aspx

Note

Use WITH NORECOVERY if you plan to also restore a differential database backup

Ref:https://msdn.microsoft.com/en-us/library/ms186858.aspx

https://msdn.microsoft.com/en-US/library/ms186216(v=sql.120).aspx

Hope this helps you.

Girish Prajwal

Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 9:47am

Hello Girish,

Thank you for the response.

Please know, when we upload the backup from disk to blob using Power shell script it is not able to restore them from the blob then. On the other hand if we do the backup via using URL to blob then it can download the backup.

Please shed some light on this behaviour.

September 12th, 2015 1:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics