Skip to content

Instantly share code, notes, and snippets.

@joe-oli
Created October 19, 2023 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joe-oli/7cc872515ef8ce51f296f40e2bd19f5e to your computer and use it in GitHub Desktop.
Save joe-oli/7cc872515ef8ce51f296f40e2bd19f5e to your computer and use it in GitHub Desktop.
Azure SQL databases - to Backup / Restore use SqlPackage
>SqlPackage /Action:Import /SourceFile:"C:\TEMP\MyDB.bacpac" ^
/TargetDatabaseName:MyRestoredDB ^
/TargetServerName:(localdb)\MSSQLLocalDB
Additional notes:
https://techcommunity.microsoft.com/t5/azure-sql-blog/connection-security-improvements-in-sqlpackage-161/ba-p/3672758
https://techcommunity.microsoft.com/t5/azure-database-support-blog/using-sqlpackage-to-import-or-export-sql-server-and-azure-sql-db/ba-p/368861
https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment