Search
  • For Individuals
      « Back
    • Windows Data Recovery

      Recovers lost or deleted Office documents, emails, presentations & multimedia files.

      Free Standard Professional Premium

    • Mac Data Recovery

      Recovers deleted files, photos, videos etc. on Mac.

      Free Standard Professional Premium

    • Photo Recovery

      Recover photos, videos, & audio files from all cameras and storage on Windows or Mac.

      Free Standard Professional Premium

    • Video Repair
    • Photo Repair
    • iPhone Data Recovery
  • For Business
      « Back
    • Email Repair & Converter

      Repair for Exchange Converter for EDB Converter for OST Converter for NSF Converter for OST MBOX Repair for Outlook

    • Database & File Repair

      Repair for MS SQL Repair for Access Repair for QuickBooks Software Repair for Excel Extractor for Windows Backup Repair for MySQL

    • Data Recovery & Erasure

      Data Recovery Professional Data Recovery Technician Mac Recovery for Technician Virtual Machine Recovery File Erasure Software Mobile Erasure Drive Erasure File Eraser Software File Eraser Software for Mac

    • Toolkit

      Exchange Toolkit Outlook Toolkit File Repair Toolkit MS SQL Toolkit Data Recovery Toolkit

    • Forensic

      Email Forensic Exchange Auditor Log Analyzer for MySQL Log Analyzer for MS SQL

  • Store
  • Partners
  • Services
  • Offers
  • Support

 

  • For Individuals
    DIY software for anyone who works with data.

    Windows Data Recovery Recovers lost or deleted Office documents, emails, presentations & multimedia files

    Free Standard Professional Premium

    Mac Data Recovery Especially for Mac users to recover deleted documents and multimedia files from macOS

    Free Standard Professional Premium

    Video Repair Windows Mac Repair multiple corrupt videos in one go. Supports MP4, MOV & other formats.

    StandardPremium

    Photo Recovery Windows Mac Recover photos, videos, & audio files from all cameras and storage on Windows or Mac.

    Standard Professional Premium

    iPhone Data Recovery Windows Mac Recover deleted photos, videos, contacts, messages etc. directly from iPhone & iPad

    Recover Erase Toolkit

    Photo Repair Windows Mac Repair multiple corrupt photos in one go. Supports JPEG & other formats.

    Standard Professional Premium


  • For Business
    • Email Repair
    • Email Converter
    • File Repair
    • Data Recovery & Erasure
    • Toolkit
    • Forensic

    Exchange Repair Repair corrupt EDB file & export mailboxes to Live Exchange or Office 365

    Outlook PST Repair Repair corrupt PST & recover all mailbox items including deleted emails & contacts

    OLM Repair Repair Outlook for Mac (OLM) 2011 & 2016 backup files & recover all mailbox items

    Exchange Toolkit Repair EDB & Exchange backup file to restore mailboxes, convert OST to PST, & convert EDB to PST

    Active Directory Repair Repair corrupt Active Directory database (Ntds.dit file) & extract all objects in original form

    EDB to PST Convert online & offline EDB file & extract all mailbox items including Public Folders in PST

    OST to PST Convert inaccessible OST file & extract all mailbox items including deleted emails in PST

    NSF to PST Convert IBM Notes NSF file & export all mailbox items including emails & attachments to PST

    MBOX to PST Convert MBOX file of Thunderbird, Entourage & other clients, & export mailbox data to PST

    OLM to PST Convert Outlook for Mac Data File (OLM) & export all mailbox data to PST in original form

    GroupWise to PST Convert GroupWise mail & export all mailbox items - emails, attachments, etc. - to PST

    EML to PST Convert Windows Live Mail (EML) file & export mailbox data - emails, attachments, etc. - to PST

    Office 365 to PST Connect to Office 365 account & export mailbox data to PST and various other formats

    DBX to PST Convert Outlook Express (DBX) file & export all mailbox data - emails, attachments, etc. - to PST

    SQL Repair Repair corrupt .mdf & .ndf files and recover all database components in original form

    Access Repair Repair corrupt .ACCDB and .MDB files & recover all records & objects in a new database

    QuickBooks Repair Repair corrupt QuickBooks® data file & recover all file components in original form

    MySQL Repair Repair MyISAM & InnoDB tables and recover all objects - keys, views, tables, triggers, etc.

    Excel Repair Repair corrupt Excel (.XLS & .XLSX) files and recover tables, charts, chart sheet, etc.

    BKF Repair Repair corrupt backup (BKF, ZIP, VHDX and .FD) files and restore complete data

    Database Converter Interconvert MS SQL, MySQL, SQLite, and SQL Anywhere database files

    PowerPoint Repair Repair corrupt PPT files and restore tables, header, footer, & charts, etc. like new

    File Repair Toolkit Repair corrupt Excel, PowerPoint, Word & PDF files & restore data to original form

    Data Recovery Windows Mac Recover lost or deleted data from HDD, SSD, external USB drive, RAID & more.

    Technician Toolkit

    Tape Data Recovery Retrives data from all types and capacities of tape drives including LTO 1, LTO 2, LTO 3, & others.

    Virtual Machine Recovery Recover documents, multimedia files, and database files from any virtual machine

    File Erasure Permanently wipe files and folders, and erase traces of apps and Internet activity.

    Standard Corporate

    Mobile Erasure Certified and permanent data erasure software for iPhones, iPads, & Android devices

    Drive Erasure Certified and permanent data erasure software for HDD, SSD, & other storage media Windows Mac

    Exchange Toolkit 5-in-1 software toolkit to recover Exchange database, convert EDB to PST, convert OST to PST, restore Exchange backup, and reset Windows Server password.

    Outlook Toolkit Comprehensive software suite to repair PST files, merge PST files, eliminate duplicate emails, compact PST files, and recover lost or forgotten Outlook passwords.

    File Repair Toolkit Powerful file repair utility to fix corrupt Word, PowerPoint, and Excel documents created in Microsoft Office. It also repairs corrupt PDF files and recovers all objects.

    MS SQL Toolkit 5-in-1 software toolkit to repair corrupt SQL database, restore database from corrupt backup, reset database password, analyze SQL logs, & interconvert databases.

    Data Recovery Toolkit Software helps to recovers deleted data from Windows, Mac and Linux storage devices. Also supports recovery from RAIDs & Virtual Drives.

    Email Forensic Advanced email forensic solution for cyber experts to audit, analyze, or investigate emails & gather evidences.

    Exchange Auditor Exchange Server monitoring solution to automate audits, scans and generate reports ìn real-time.

    Log Analyzer for MySQL Analyze forensic details of MySQL server database log files such as Redo, General Query, and Binary Log.

    Log Analyzer for MS SQL Track & analyze MS SQL Server database transactions log files.

    Email Forensic
    STELLAR EMAIL FORENSIC

    Advanced email forensic tool to analyze and collect the mailbox data of email clients

    Learn More arrow


    All Products arrow

    All Products arrow

    All Products arrow

    All Products arrow

  • Our Partners
  • Lab Services
  • microphone-icon-android

    Trending Searches

    Data Recovery

    Photo Recovery

    Video Repair

    iPhone Data Recovery

    File Erasure Software

    Exchange Repair

    OST to PST

    PST Repair

    Raid Recovery

    MS SQL Repair

  • English Deutsch Français Nederlands Italiano Español 日本語 简体中文
  • Support
Database Recovery 4 minute read

How to Restore Database Backup in SQL Server 2012

Updated on March 25th, 2022
Samuel Okudjeto (SQL Server DBA)
Written By
Samuel Okudjeto (SQL Server DBA)
Kuljeet Singh
Approved By
Kuljeet Singh

Summary: Let’s learn how to restore a SQL Server database backup for SQL Server 2012. There are various methods of taking database backups, which include using T-SQL code, SQL Server Management Studio, or third-party applications. These backups taken are purposely saved to be restored when the database becomes corrupt or crashes, migrating the database, making a copy of the database, and other business requirements. In this crash course, we will be focusing on how to restore SQL Server database backup by using the SQL Server Management Studio (SSMS) GUI, T-SQL code and SQL recovery software.

How to Restore Database Backup in SQL Server 2012

Prerequisites

For this backup restoration procedure, we assume that the database backup is readily available and the file location is known. We also have permissions to access the file/directory as well as there are no corruption or disk issues with the backup file. Also, the version of the database is not greater the version of the SQL Server on which the backup needs to be restored. For example; you cannot restore a database with version 130 (SQL Server 2016) on a SQL Server 2012 or version (110) – Read More

Steps to restore database backup by using SQL Server Management Studio in SQL Server 2012

Step 1: Start your SQL Server Management Studio and connect to the SQL instance you will be restoring the backup:

Stellar
Connect to SQL Server Instance

Step 2: Right click databases under object explorer and select “Restore Database…” to open the dialog box.

Stellar
Restore Database

Step 3: Verify under the source option if the correct source database is selected. You can click the dropdown list to select the specific database. You also need to specify the destination database for this restore.

NOTE: Restore to a new database by typing/specifying the new name of the destination database or select from the list to overwrite. You need to understand the implications of overwriting the existing database with the backup.

Stellar
Select Specific Database

Step 4: On the restore database dialog box, there are two options for choosing the backup database. One is for the last backup taken and the second for selecting a specific data and time. Choose the one appropriate for you, then click on the “OK” Button:

Stellar
Options for Choosing Database Backup
Stellar
Two Options for Database Backup

Step 5: Now click on Files Option on the left pane. Restored files can be reallocated to the desired specified folders. You can also rename the physical file name of database files (MDF, NDF, and LDF)

Stellar
Relocated the Files to Folder

Step 6: On the Options page, in the Restore options panel, you can select any of the following options, if appropriate for your situation:

  • Overwrite the existing database (WITH REPLACE)
  • Preserve the replication settings (WITH KEEP_REPLICATION)
  • Prompt before restoring each backup
  • Restrict access to the restored database (WITH RESTRICTED_USER)

Select an option for the Recovery state box. This box determines the state of the database after the restore operation.

RESTORE WITH RECOVERY is the default behavior which leaves the database ready for use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. Select this option if you are restoring all of the necessary backups now.

RESTORE WITH NORECOVERY which leaves the database non-operational and does not roll back the uncommitted transactions. Additional transaction logs can be restored. The database cannot be used until it is recovered.

RESTORE WITH STANDBY which leaves the database in read-only mode. It undoes uncommitted transactions but saves the undo actions in a standby file so that recovery effects can be reverted.

NOTE: Restore operations will fail if there are active connections to the database. Check the Close existing connections option to ensure that all active connections between Management Studio and the database are closed.

Select Prompt before restoring each backup if you wish to be prompted between each restore operation. This is not usually necessary unless the SQL database is large, and you wish to monitor the status of the restore operation.

Stellar
Database Restore Options

Step 7: Now click on the ok button to restore the database or if you wish to script your configurations into a TSQL code, then click “Script” and select appropriate action as shown below.

Stellar
Script Option
Stellar
Check Script of the Database

Step 8: A progress indicator appears as shown in the screenshot and a message box is displayed once the restore is successful.

Stellar
Database Restore Progress Indicator
Stellar
Success Message

TSQL Code Reference

--TSQL COMMAND TO RESTORE DATABASE DBXXX FROM A BACKUP FILE
 USE [master]
 RESTORE DATABASE [DBXXX] 
 FROM  DISK = N'\MyServer\MyNAS\Backups\SQL_Backups\USERDB\FULL\DBXXX\
              DBXXX_backup_2018_09_30_010002_2112459.bak' 
 WITH  FILE = 1,  NOUNLOAD,  STATS = 5
 GO
--CHECK THE STATUS OF THE RESTORE
 SELECT PERCENT_COMPLETE, ESTIMATED_COMPLETION_TIME, *
 FROM SYS.DM_EXEC_REQUESTS
 WHERE COMMAND LIKE '%RESTOR%'

Conclusion

This demonstration is a perfect scenario where you are not facing any corruption, database inaccessibility, lost database files, and virus-infected databases. In this case, you can easily restore a database in a few clicks or write a simple T-SQL script as shown above to achieve a full database restore. Are you caught up in the worst scenario where you cannot complete a restore due to the possible factors mentioned earlier?

I would like to introduce to you a robust SQL Database recovery tool that will not only fix your database with the least minimal data loss and potentially help you restore deleted records from the database.

About The Author

Samuel Okudjeto

Samuel Okudjeto is a technology enthusiast with great interest in database administration and analytics. He has many certifications including the Microsoft Certified Expert Professional. Along with 6+ years of hands-on experience, he holds a Masters of Science degree in Business Analytics. Read more

Best Selling Products

Stellar Repair for MS SQL

Stellar Repair for MS SQL

Stellar Repair for MS SQL is an enterpri

Read More
Stellar Toolkit for MS SQL

Stellar Toolkit for MS SQL

3-in-1 software package, recommended by

Read More
Stellar Converter for Database

Stellar Converter for Database

Stellar Converter for Database is an eff

Read More
Stellar Repair for Access

Stellar Repair for Access

Powerful tool, widely trusted by users &

Read More

2 comments

  1. Nira Marker says:
    February 27, 2020 at 12:05 pm

    Have taken MySQL backup and now restoring that into DB through cmd. But it’s showing an error as the specific file can’t specified. Any help?

    Reply
  2. Dana Keiper says:
    August 26, 2019 at 12:07 pm

    Hi Samuel,

    We appreciate your depth research i.e. helpful for our ongoing project. We have limited time to try this software.

    Reply

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

  +  48  =  54

Table of Contents    arrow

Categories

Related Posts

related post
Database Recovery

How to Fix Error “The database cannot be recovered because the log was not restored”?

Stellar Author Charanjeet Kaur April 15, 2022 Read More
related post
Database Recovery

How to Fix System Database Corruption in SQL Server?

Stellar Author Charanjeet Kaur April 8, 2022 Read More
related post
Database Recovery

How to Get Data from a Corrupt SQL Table?

Stellar Author Charanjeet Kaur March 4, 2022 Read More

Free Trial for 60 Days

Stellar Official Website

Stellar Data Recovery Inc.
48 Bridge Street Metuchen,
New Jersey 08840,
United States

ALSO AVAILABLE AT

Partner Logo

About

  • About us
  • Career
  • ISMS Policy
  • Privacy Policy
  • Terms of Use
  • License Policy
  • Refund Policy
  • End User License Agreement

RESOURCES

  • Blog
  • Articles
  • Product Videos
  • Knowledge Base
  • Case Studies
  • Whitepapers
  • Software Catalog

NEWS & EVENTS

  • News
  • Events

PARTNERS

  • Affiliates
  • Resellers
  • Distributors

Useful Links

  • Contact Us
  • Support
  • Special Offers
  • Student Discounts
  • Awards & Reviews
  • Downloads
  • Store
  • Sitemap
Follow Us

tw in yt

Stellar & Stellar Data Recovery are Registered Trademarks of Stellar Information Technology Pvt. Ltd. © Copyright 2022 Stellar Information Technology Pvt. Ltd. All Trademarks Acknowledged.

Hippa Logo tuv footer partner logo DMCA.com Protection Status
We use cookies on this website. By using this site, you agree that we may store and access cookies on your device Read More Got it!