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.
How do you restore a .bacpac? Well, you import it. If you right click the databases folder in SSMS, you’ll see this:
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.
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.
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.
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.
Once you click Finish, the import begins. This can take time, depending on the system you use.
However, you get detailed progress. As you can see, I get a lot of details on what happened. There’s plenty more below this.
But it worked, and I have my data.
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.
SQLNewBlogger
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.
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
LikeLike
https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/wide-world-importers
LikeLike