How do I import a database to Azure SQL?

  • Page Owner: Not Set
  • Last Reviewed: 2022-07-26

How do I move a .bacpac file from somewhere else to a SQL Azure database?


Answer

First you need to upload the bacpac file to Azure storage:

  • Upload a bacpac to the blendqa storage account, the sqlbackup container.

Next you need to import the database to an independent server (you can't upload directly to a DB Pool):

  • In the Azure portal, go to the blendinteractive database.
  • Click the Import Database button.
  • Select the uploaded .bacpac file from the storage container.
  • Fix the Database name if necessary
  • Change Authentication type to SQL Server
  • Look up the password in 1Pass :Blend Interactive Azure DB Server
  • Click OK.

The database will import. By default, it will import into an independent tier, but unless the DB needs dedicated resources, it should be put into the Blend DB Pool for cost savings.

  • Navigate to the SQL Databases of the blendinteractive server, you should see the new database in the list.
  • Click on the SQL elastic pools, then select the BlendDBPool pool.
  • On the Pool page, click Configure on the left, then the Databases tab.
  • Click Add databases and select the new database and Apply.
  • Then click Save to finalize moving the DB to the pool.

Once that's all done, you generally want to create a specific user for that database, rather than the BlendInteractive user. See here: https://stackoverflowteams.com/c/blend-interactive/questions/392