Join Adam Wilbert for an in-depth discussion in this video What you should know: Restoring your database backup, part of Database Fundamentals: Creating and Manipulating Data.
- This course is picking up from where we left off at the end of Database Fundamentals: Core Concepts. In order to make sure that everyone is on the same page I'd like to refresh the database files that we're working with. We'll be working with the database for H+ Active, a company that manufactures a line of athletic clothing and we could find a backup copy of that database inside of our exercise files folder, inside of chapter one, and it's this file right here that says H+ Active and the CMD for Creating and Manipulating Data-Start. What I'm going to do is right-click on that and choose copy and then we're going to browse out to the location where we can place this in order to load it into SQL Server Management Studio.
So I'm going to go out to my C-Drive and then I'm going to go into program files and then I'm going to find Microsoft SQL Server down here and from there we'll go into the folder that represents the instance of SQL Server that we've installed. So it's this folder here for me and then inside of MS SQL and then finally inside of Backup. Now this is the file that we loaded in the previous course so what I want to do is just right-click here and say paste to paste in a copy of the new starting file for this course and we're good to go so now we can switch into SQL Server Management Studio.
I've loaded up SSMS and I've logged into the instance of My SQL Server. Now I can go into the database folder here and if you have it, I'd like to have you right-click on the H+ Active database that's there already and choose delete. That'll remove the old version from our system. We'll go ahead and say okay and this should process and delete that database from our system. Next we're going to come up here to Databases and right-click and choose Restore Database. Then we're going to choose to restore from a device here and then I'll go way over here to the right and push this button here. Now we can choose if we want to restore from a file and I'll press add and then I'm going to choose the H+Active_CMD-Start file right here.
We'll go ahead and select it, press okay. That'll add it right here to my Backup media line. We'll say okay and then we'll go ahead and say okay and that should reinstall the backup file. Management Studio has told me that the restore was successful so we'll say okay to this and now everyone has a clean and consistent copy of the same database to work with.
Note: This course will also prepare certification candidates for the Microsoft Technology Associate Exam 98-364, Database Administration Fundamentals.
- Storing dates, times, and text
- Converting data types
- Creating tables
- Writing T-SQL commands
- Selecting records with queries
- Combining and sorting data
- Creating views
- Creating stored procedures and functions
- Inserting and updating data in a table
- Deleting records and tables