Home » Blog » SQL Server » How to Create Database Backup in SQL Server?
SQL Server

How to Create Database Backup in SQL Server?

  author
Published By Mohit Jha
Nimisha Ramesh
Approved By Nimisha Ramesh
Published On April 4th, 2022
Reading Time 5 Minutes Reading

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 SQL database to avoid data loss problems. When a user has a backup (.bak) file of a SQL Server database, it is easy to reinstate data in SQL Server. This blog deals with how users can create database backups in SQL Server. Here, we will also discuss a complete solution of how to recover corrupted SQL Server database from BAK file.

User Query

Hi, I am using MS SQL Server 2012 and I am looking for a solution to create a backup of SQL Server database, can anyone guide me on how to create a SQL database backup? Suggest a reliable solution that will not lose or corrupt any data.
Mack Edison, USA

Backup SQL Database using T-SQL

Steps to create a full SQL database backup with Transact SQL are as follows;

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.

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.

Finished! This is the complete process to create a database backup in SQL Server using SQL Server Management Studio and T-SQL. Now we learn how to reinstate database from backup.

How to Reinstate BAK File in SQL Server Using SSMS?

  • Right Click on the Database >> Tasks >> Restore >> Database
  • Next, under the Source for reinstate, 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 reinstate 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 Reinstate SQL Server BAK File Which Got Corrupted?

When you create a database backup in SQL Server and the backup file is in normal state. You can reinstate a BAK file in SQL Server using SSMS, but if a SQL Server backup file is corrupt, you must choose a reliable solution as there is no built – in utility to reinstate SQL Server database from the corrupted BAK file. SQL Server Backup Recovery Tool is a reliable solution. efficient and fastest to reinstate database from .bak file

Download the software on the Windows system by clicking on the below link:

Download Now Purchase Now

The steps to work are as follows:

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

Add SQL BAK File to Create Database Backup in SQL Server

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

Auto Detect SQL BAK File Version

Step 3. Click on Multiple Backup File Option

Create Database Backup in SQL Server

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

Create Healthy BAK Files

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

Create Database Backup in MS SQL Server

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

Reinstate BAK File to SQL Server Database

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

Reinstate SQL Database from BAK File

That’s how to reinstate BAK files in SQL Server using SQL Server Management Studio. SQL databases can be easily recreate from corrupted BAK files using professional software.

Best Features of This Tool

When you create a database backup in SQL Server, the software provides several features to reinstate files, some of which are listed below.

  • 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 reinstate 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 & reinstate corrupted MS SQL database backup file

Conclusion

Step by step instructions for creating a database backup in SQL Server and restoring a baking file using SSMS were discussed using professional software.

Why Choose FREEVIEWER?

3M+

Happy Clients

250+

Products

100+

Countries

15+

Years of Experience