Azure Export SQL database example

前端 未结 4 766
我在风中等你
我在风中等你 2021-01-12 09:24

Given Microsoft is deprecating the previous method of exporting a SQL DB they have put up a suggested example here:

$subscriptionId = \"YOUR AZURE SUBSCRIPT         


        
相关标签:
4条回答
  • It appears that the database name is case sensitive when using az sql db export. Correcting the casing on the database name and resource group solved this issue in my case.

    0 讨论(0)
  • 2021-01-12 09:48

    This has just come out from MS/Azure and helps greatly with DB Export.

    https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/azure-automation-automated-export

    0 讨论(0)
  • 2021-01-12 09:49

    Seems really stupid but the error for me was because my "DatabaseName" parameter was case sensitive.

    I was sending in the value "database" but the actual database name was "Database"

    seems crazy but might help someone out

    0 讨论(0)
  • 2021-01-12 09:50

    The PowerShell script example in your question above is tested working as expected for me.

    However, I am not able to reproduce the same error message as yours even try to use non-existent resource group, database server or database.

    Important Note:

    1. For $serverAdmin and $serverPassword, their values should be single-quoted instead of double-quoted for the script to work
    2. Check the version of your AzureRm.Sql module. Mine tested working is 2.5.0
    3. Try to use -Debug for your New-AzureRmSqlDatabaseExport command line to see the details
    0 讨论(0)
提交回复
热议问题