1

I want to restore a bacpac file over an existing Azure SQL database using PowerShell. Past with experience with restoring bacpac files in Azure requires creating a new database altogether when restoring the bacpac file. I'm looking to avoid that and just restore the bacpac file over an existing (empty) database.

Ideally, the bacpac would be stored in a storage account container and I can reference the container and run a powershell command to perform the restore over my existing database. In my search I haven't found anything that'll accomplish this. Has anybody figured this out or something similar to what I described?

Thanks,

jrd1989
  • 628
  • 10
  • 35

1 Answers1

0

You cannot do that.

You have to:

  1. Restore the database and call it restored_database
  2. Delete the current database called database
  3. Rename the restored_database with the name database