Create Backup and Restore Database in SQL Server 2012

Introduction

When using a database you often need to create a backup file of the database to store the information periodically, which is useful when you have lost your database from SQL Server for whatever reason. In this situation you can restore your database from the backup file and get the deleted information back.

Use the following procedure to create and restore a database backup file.

Creating the Backup

Step 1

Open SQL Server 2012 and create a database then right-click on the "Name of database" >> "Task" >> "Backup".

backup.jpg

Step 2

Now the Backup database window will be shown; click on the "Add" button to add the designation to save the backup file in the hard disk.

backup-satya-window.jpg

degination-window.jpg

Step 3

Choose the location where you want to save the backup file.

specified-location.jpg

Step 4

After inserting a name for your backup click on the "Ok" button to see the message:

backup-succfully.jpg

Restore Database

Step 1

Right-click on the "Database" >> "Restore Database".

resote-database.jpg

Step 2

Select the Radio button "Device" then click on the button to get the database backup file.

backup-satya-window.jpg

Step 3

Click on the "Add" button to get the database file.

select-backup-device.jpg

Step 4

 After adding the backup file click on the "OK" button.

 restore-database.jpg

Step 5

The following message is displayed after the database is restored:

restore-successfully.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all