How to Create Database Backup in SQL Server? – Restore BAK File

Admin | May 1st, 2019 | SQL Server

SQL Server is the most popular relational database management system for storing and retrieving data. When using a database, almost all users need to create a backup of the database to avoid a data loss problem. When users have a backup file (.bak) of SQL Server database, it is easy to restore in SQL Server. This blog is all related to how a user can create database backup in SQL Server and restore BAK file. Here, we will also discuss a complete solution of how to recover corrupted SQL Server Database from BAK file.

User Query – How To Create Database Backup in SQL Server

Hello, I am using MS SQL Server 2012 and looking for a solution to create a backup of SQL Server database. Can someone guide me on how to create SQL database backup? Please suggest me a reliable solution that will not lose or corrupt any data information.”
Mack Edison, USA

Create Backup of SQL Database using T-SQL

Follow the steps to create a full SQL database backup with T-SQL or Transact- SQL.

1. Execute the BACKUP DATABASE statement to create a complete backup of the database by specifying:

    • Name of the database to backup
    • The backup device where the full database is written
    • The Syntax for full Database backup is:

BACKUP DATABASE AdventureWorks
TO DISK = ‘C:\AdventureWorks.BAK’
GO
Add different Options to backup with Options

2. Specify one or more WITH options which include:

  • Description = {;text’|@text_variable }. Description signifies the free-form text of the backup set.
  • { COMPRESSION | NO_COMPRESSION }. Signifies whether backup compression is performed on this backup.
  • NAME = { backup_set_name | @backup_set_name_var }. Specifies the name of the backup set.

Similarly, there are more T-SQL database commands for differential backup.

How to Create Database Backup in SQL Server Using SSMS?

  1. Open Microsoft Server Management Studio and connect to the SQL Server database engine
  2. Next, go to Object Explorer and click the Server Name to expand the Server tree
  3. Select the Database >> Right Click >> Tasks >> Back Up
  4. The Back Up database window will appear, select the backup type as Full
  5. Click on the Add button to select the destination and file name for the database backup file
  6. Select the folder for the backup file and enter the File Name with a .bak extension
  7. Click OK button to finish the backup of MS SQL Server Database.

Done! This is the complete process to create Database backup in SQL Server using SQL Server Management Studio and T-SQL.

How to Restore BAK File in SQL Server Using SSMS?

  • Right Click on the Database >> Tasks >> Restore >> Database
  • Next, under the Source for restore select “From device” option and click the Browse button
  • In the Specify Window, click Add button
  • Select the .bak file and click OK
  • In Destination for restore section, select the database you want to restore. Select the .bak file you selected in the above step
  • In the left panel, click Options and select the Restore option and also select Recovery state option according to your need
  • Click OK button to start the process of restoring SQL database from the BAK file.

How to Restore SQL Server BAK File Which Got Corrupted?

When you create database backup in SQL Server and the backup file is in a healthy state, you can restore BAK file in SQL Server using SSMS. But if the SQL Server backup file is corrupted, you must opt for a third-party solution because there is no inbuilt utility to backup and restore SQL Server Database from BAK file which is damaged. The SQL Server Backup Recovery Tool is the most reliable, efficient and instant solution to repair & restore database in SQL Server from .bak file.

Steps to Repair and Restore BAK File

Step 1. Download, install and run the software on the Windows system

download

Step 2. Click Open and browse to add the SQL .BAK file

Add SQL BAK File

Step 3. Auto detect the SQL Server .bak file version or manually select the actual version

Auto Detect SQL BAK File Version

Step 4. Click on Multiple Backup File Option to restore bak file in bulk

Restore Multiple BAK File

Step 5. Click on the Recover button to start the recovery of SQL Server corrupt backup file

Recovery of Corrupted BAK Files

Step 6. After finishing the recovery process, select the Export button

Export BAK File In SQL Server

Step 7. Select the option:- Export to SQL Server Database or Export as SQL Server Compatible Scripts and fill all the required information

Restore BAK File to SQL Server Database

Step 8. Click on the Export button to export all the recovered data items to the SQL Server.

Export BAK File In SQL Server Database

That’s how you restore BAK file in SQL Server using SQL Server Management Studio. Also, can easily restore SQL database from BAK file which is damaged using the professional software.

Best Features of SQL BAK File Repair & Restore Tool

Once you create database backup in SQL Server, the software offers multiple features to restore bak file and some of them are listed in the below section.

  • Supports to repair corrupt SQL backup file which contains MDF & NDF database files.
  • Works with all SQL Server versions such as SQL Server 2017, 2016, 2014, 2012, 2008, etc.
  • Provides a preview of database objects like tables, views, functions, etc. after recovery
  • Offers to restore SQL Server BAK file to a new database or existing database
  • Directly export recovered database objects to the SQL Server database or SQL scripts
  • No file size limitations to repair & restore corrupted MS SQL database backup file

Conclusion

In this blog, we explained step by step method of how to create database backup in SQL Server and restore bak file using SSMS. Here we also discussed how to restore SQL Server Database from BAK file which is in an unhealthy state using professional software.