none
Take BackUp into Azure Blob

    Question

  • Hi,

    I have a scenario where i have to take backup of my OnPremise Sql Database to Azure Blob

    So i have setup the Azure Storage account of blob Storage created the container in it.Container is of type Private

    In my On Premise I have created the Credential and then i have run the BackUp Statement below

    BACKUP DATABASE Sujith 
    TO URL = 'https://dfsfs.blob.core.windows.net/dscs/Sujith.bak' WITH CREDENTIAL = 'cdsdsvsdv',COMPRESSION,STATS = 5;
    GO 

    when i run it i get the below Error

    Msg 3271, Level 16, State 1, Line 1
    A nonrecoverable I/O error occurred on file "https://dfsfs.blob.core.windows.net/dscs/Sujith.bak:" Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (400) Bad Request..
    Msg 3013, Level 16, State 1, Line 1
    BACKUP DATABASE is terminating abnormally.

    How can i make my Storage account accessible?i tired it in internet explorer also with URL,it says Resource not Found.

    Thanks,

    Sujith.


    Sujith

    Thursday, February 2, 2017 4:49 PM

Answers

  • Hi Sujith,

    did you do the following:

    1. Create general purpose storage account
    2. Create private blob container
    3. Define the credentials in SQL (using storage account name and access key)
    4. Add the backup query with the blob endpoint URI created in step 2

    Floris van der Ploeg - www.florisvanderploeg.com

    If my post was helpfull, remember to click the "Propose as answer" button.

    Friday, February 3, 2017 8:54 AM

All replies

  • Hi Sujith, Your storage account type should be general purpose, not blob.

    Floris van der Ploeg - www.florisvanderploeg.com

    If my post was helpfull, remember to click the "Propose as answer" button.

    Thursday, February 2, 2017 11:07 PM
  • Hi Floris,

    Thanks for the Reply.

    I have made my Storage account General Purpose and created a Blob Container

    I just tried to access in IE using the URL

    https://xyz.blob.core.windows.net/xyzblob

    I Still get the Error like below

    <?xml version="1.0" encoding="UTF-8"?>
    <Error>
    <Code>ResourceNotFound</Code>
    <Message>The specified resource does not exist. RequestId:9c70e367-0001-0088-5cdf-7d864f000000 Time:2017-02-03T05:38:33.2655796Z</Message>
    </Error>

    Do I have to do any Settings to let my storage account accessible using Url?

    Thanks,

    Sujith.


    Sujith

    Friday, February 3, 2017 5:46 AM
  • Hi Sujith,

    did you do the following:

    1. Create general purpose storage account
    2. Create private blob container
    3. Define the credentials in SQL (using storage account name and access key)
    4. Add the backup query with the blob endpoint URI created in step 2

    Floris van der Ploeg - www.florisvanderploeg.com

    If my post was helpfull, remember to click the "Propose as answer" button.

    Friday, February 3, 2017 8:54 AM
  • Sujith,

    on a side-note, a private container isn't accessible from IE; you'll need to be authenticated.


    Floris van der Ploeg - www.florisvanderploeg.com

    If my post was helpfull, remember to click the "Propose as answer" button.

    Friday, February 3, 2017 10:25 AM