How to load (import) by rewriting azure database with sqlpackage.exe

It should be a simple thing, I want to load / import my database with overwrite option, but I cannot find it in the documentation

I need to manually remove it and load it using Import.

+3


source to share


1 answer


Ok I found a solution

"C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ DAC \ bin \ sqlpackage.exe" / a: Export / ssn: "windowsusername \ sqlexpress" / sdn: yourdbname / tf: yourdbname.bacpac



sqlcmd -U dbusernameonazure@azureservename.database.windows.net -P yourpassword -S azureservename.database.windows.net -Q "drop DATABASE yourdbname"

"C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ DAC \ bin \ sqlpackage.exe" / a: Import /SourceFile:yourdbname.bacpac/tsn:azureservename.database.windows.net,1433/tdn: yourdbname / tu: dbusernameonazure / tp: yopurpassword

+5


source







All Articles