Azure SQL Database Bacpac Local Restore

后端 未结 6 1247
轻奢々
轻奢々 2020-11-29 16:28

I\'ve created a BACPAC backup of my Azure SQL Database using the \"Export\" option within the Azure Management Console.

Having downloaded this to my machine I\'m a l

6条回答
  •  被撕碎了的回忆
    2020-11-29 17:19

    Here's a script to restore a bunch of bacpac files at once: Bulk Restore bacpac files local

    cd [FOLDERPATH]
    $goodlist = dir
    cd 'C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin'
    foreach($i in $goodlist){ $name = $i.Name; $namer = $i.Name.Substring(0, $i.Name.length - 7); .\SqlPackage.exe /a:Import /sf:[FOLDERPATH]\$name /tdn:$namer /tsn:[SERVERNAME] }
    

提交回复
热议问题