Restore a BACPAC–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

I needed to get the WideWorldImporters sample database for a project and noticed that there was a BACPAC available. I downloaded it and needed to restore this as a database. At least, that’s what many people would think.

However, if you go to the restore dialog, and select Device and then pick your location, there’s no filter for a .bacpac. In fact, if you choose one, it won’t restore. You’ll get the “no backupset selected” error.

2017-05-30 08_51_40-Locate Backup File - PLATO_SQL2016

How do you restore a .bacpac? Well, you import it. If you right click the databases folder in SSMS, you’ll see this:

2017-05-30 08_54_40-SQLQuery16.sql - (local)_SQL2016.model (PLATO_Steve (60))_ - Microsoft SQL Serve

The BACPAC is a DACPAC with data, in other words, a data-tier application with the data included. Once we click this, we get a wizard. Of course, there’s a introduction screen.

2017-05-30 08_57_17-Import Data-tier Application

Then we get to choose the file, or import one from Windows Azure storage. I’ll limit the image here to the relevant parts. You can see below I’ve selected the file I downloaded.

2017-05-30 08_57_33-Import Data-tier Application

Once I do that, the next screen allows me to set the database name and the paths. I shot this screen, and then changed the name, but forgot to reshoot. However, this is where you’d set the paths for files and change the name of the database.

2017-05-30 08_58_30-Import Data-tier Application

You get to verify your settings. I know many people blow by this screen, but make sure you double check this is what you want. Notice I moved the data, but not the log. I went back and fixed things, again, forgetting to reshoot the image.

2017-05-30 08_59_25-Import Data-tier Application

Once you click Finish, the import begins. This can take time, depending on the system you use.

2017-05-30 08_59_31-Import Data-tier Application

However, you get detailed progress. As you can see, I get a lot of details on what happened. There’s plenty more below this.

2017-05-30 09_06_28-Import Data-tier Application

But it worked, and I have my data.

2017-05-30 09_07_28-SQLQuery1.sql - (local)_SQL2016.WideWorldImporters (PLATO_Steve (59))_ - Microso

You should practice this. It’s simple, but know how to import a BACPAC. You never know when you might get one and someone is at your desk. Having to google to import a simple database is a little embarrassing.


This is a simple post, one that took longer to write than setup and perform, but a good skill to showcase. If you’re looking for something to blog, create a bacpac on another instance and import it into your local SQL Server.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , , . Bookmark the permalink.

2 Responses to Restore a BACPAC–#SQLNewBlogger

  1. Nice, I remember a faced this problem few months ago.
    BTW, what is “WideWorldImporters sample database”? Where can I find a copy of it? I might need it for a project too. Thank you


Comments are closed.