From the course: SQL Server 2016: Administer a Database Infrastructure

Install the sample database - SQL Server Tutorial

From the course: SQL Server 2016: Administer a Database Infrastructure

Start my 1-month free trial

Install the sample database

- [Instructor] Some of the examples that we'll be looking at in this course will benefit from having a database available with a lot of tables and data already present. Microsoft provides an example database for exactly these sorts of reasons and it's used in a variety of examples and tutorials and it's also referred to throughout many of the technical documentation resources that you'll find online. The database follows a fictitious company called Wide World Importers and you can download it from the Microsoft GitHub page at this URL. There are several different versions of the database available and you need to match the one that you download to the version of SQL Server that you're using. For me, I'm on SQL Server 2016 and I know that I already have Service Pack 1 installed. So I'm going to ahead and grab the full backup from the very top of the list here, the WideWorldImporters-Full.bak file. Clicking on the link will start the download process. If you're on an older version of SQL Server or working in Azure, then there are different downloads for you to consider. The Standard and Express edition users will have to scroll down to the very bottom and find the links underneath the legacy section. When the backup database finishes downloading we need to move it into SQL Server's backup folder. To do that, we'll come in to our Downloads folder and we'll find the backup that we just downloaded. I'll right-click on it and choose Cut. and then we'll go out to the C drive. Inside of there, we'll go to the Program Files folder then inside of Microsoft SQL Server and then we'll need to find the folder that corresponds to the server instance that we're working with. In my case, it's a folder called MSSQL13.SQL_2016. There are a couple of similarly named folders in the same location. We have MSRS13 and there's MSAS13 folder as well. These stand for analysis services and reporting services and are not the folders that I want to go into. So let's make sure we go into the one labeled MSSQL. Then we'll go into the other MSSQL folder and then finally into the backup folder. At this point, you might see a popup dialogue box saying that you don't have permission to enter this folder. Simply press the OK button and you'll be granted that permission. Then we can right-click and choose Paste to paste in that backup file. Now we just need to install it inside of SQL Server Management Studio. To restore the database from a backup, we'll come over to the Databases folder in the Object Explorer pane, right-click and choose Restore Database. The source for our restoration is going to be a device, so I'll choose this radio button here and then press the ellipses button on the far right in order to choose a backup device. The backup media will be coming from a file not a URL, and then we'll press Add to add in the new backup media. That should drop us right back into the backup folder that we were just at. I'll choose the WidwWorldImporters-Full.bak file and press OK. That gets added into the backup media list here. I'll press OK again. And then OK one more time. Then I'll go ahead and start the restore process. When it's done, you'll see this message that the database restore was successful. Go ahead and press OK and then we can go ahead and see the database here inside of the Databases folder and there's the WideWorldImporters database. We'll use this database and some additional temporary databases to explore the concepts in this course.

Contents