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.

    STELLAR EMAIL FORENSIC

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

    Learn More arrow


    All Products

    All Products

    All Products

    All Products

  • Our Partners
  • Lab Services
  • 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
Toolkit for MS SQL 6 minute read

How to restore database in SQL Server 2008 R2 from .bak file

Updated on March 22nd, 2022
Ayman Elnory (Sr. DBA)
Written By
Ayman Elnory (Sr. DBA)
Raja Jegan R
Approved By
Raja Jegan R

Summary: No doubt that the backup and restore the database is the main task of any SQL Server DBA. We will discuss here the various ways to restore the database in SQL Server 2008 R2.

Contents

  • Permissions needed:
  • Restore database in SQL Server 2008 R2:

Permissions needed:

If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed server roles and the owner (dbo) of the database.

(for the FROM DATABASE_SNAPSHOT option, the database always exists).

RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE is executed, members of the db_owner fixed database role do not have RESTORE permissions.

Restore database in SQL Server 2008 R2:

We can use the following steps to restore the database:

  1. Open Microsoft SQL Server Management Studio, and navigate to Databases:
restore database in SQL Server 2008 R2

  1. Right-click Databases, and click Restore Database
restore database in SQL Server 2008 R2

Here, in the first section (Destination for restore)

  • If the database being restored does not exist, do not select any database in the combo box (To database) as it will be updated automatically once you select the backup file.
  • If you are restoring from a backup device, you can leave it as default (Most recent possible) to be restored to the last backup time.
    Or choose what time you need to restore the Database (You have the option to select desired Specific time to restore the database)
restore database in SQL Server 2008 R2

Then, in the second section (Source for restore)

  • If you selected from database option, this will list all backups taken for that database before. So, you can choose to copy that database to the new one using the previous backups.
  • Or, you can select from device to restore from backup device (.bak file). Then Click Add in the Specify Backup window. Browse to the location of your recently restored flat files. Choose the Full backup file which should be the first backup file in the list:
restore database in SQL Server 2008 R2

  • Click OK; the Specify Backup window displays:
restore database in SQL Server 2008 R2

  1. Click OK. In the Destination for restore section, select the database to which you wish to restore, and in the Select, the backup sets to restore section, select the backup file you selected above:
restore database in SQL Server 2008 R2

  1. In the left pane, click Options, and you can select one of the following:
restore database in SQL Server 2008 R2

In the Restore options section:

you can select one of the following options:

  • Overwrite the existing database (WITH REPLACE):

It allows you to write over an existing database when doing a restore without first backing up the tail of the transaction log.  The WITH REPLACE basically tells SQL Server to just throw out any active contents in the transaction log and move forward with the restore.

In some cases when you try to do a restore without replace option you may get an error that says

" Msg 3159, Level 16, State 1, Line 1
The tail of the log for the database "AdventureWorks" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally. "
  • Preserve the replication settings (WITH KEEP_REPLICATION):

It preserves the replication settings when restoring a published database to a server other than the server where the database was created. This option is relevant only if the database was replicated when the backup was created.

This option is available only with the Leave the database ready for use by rolling back the uncommitted transactions option (described later in this table), which is equivalent to restoring a backup with the RECOVERY option.

  • Prompt before restoring each backup:

That specifies that after each backup is restored, the Continue with Restore dialog box will be displayed to inquire whether you want to continue the restore sequence. This dialog box displays the name of the next media set (if known) and the name and description of the next backup set.

This option allows you to pause a restore sequence after restoring any of the backups. This option is particularly useful when you must swap tapes for different media sets; for example, when your server has only one tape device. When you are ready to proceed, click OK.

  • Restrict access to the restored database (WITH RESTRICTED_USER):

It makes the restored database available only to the members of db_owner, dbcreator, or sysadmin.

In the recovery state section:

You must select one of the following options to determine the state of the database after the store operation:

  • Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY):

It recovers the database after restoring the final backup checked in the Backup sets to restoregrid on the General page.

  • Leave the database non-operational and do not roll back uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH NORECOVERY):

This leaves the database in the restoring state. This allows you to restore additional backups in the current recovery path. To recover the database, you will have to perform a restore operation by using the RESTORE WITH RECOVERY option in the last backup to be restored.

If you select this option, the Preserve replication settings option is unavailable.

  • Leave the database in read-only mode. Undo uncommitted transactions but save the undo actions in a standby file so that recovery effects can be reversed. (RESTORE WITH STANDBY):

This leaves the database in a standby state, in which the database is available for limited read-only access.

Choosing this option requires that you specify a standby file in the Standby file text box. The standby file allows the recovery effects to be undone.

So for just one restore for the database, we can just select Overwrite the existing database (WITH REPLACE) option and Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY) option.

All of the above steps can be done in the happy scenario, But you may have a corrupted backup file. In that case, you do not have any option to restore this backup then, you can use Stellar Toolkit for MS SQL.

You would like to read on what SQL MVP Damian Widera says about the tool and his critical Review regarding it.

Stellar Toolkit for MS SQL is a combination of three tools developed to repair corrupt SQL server database, extract database from corrupt SQL backup file and to reset SQL Server user and Admin Password.

Conclusion

When we say back & restore the database in SQL Server 2008 R2, which is one of the mandatory tasks for each DBA, we have discussed here some of the options were existed in SQL server 2008 restore. I hope this article has been informative for you.

About The Author

Ayman Elnory

I am Microsoft® Certified Solutions Expert: Data Management Analytics plus Microsoft® Certified Solutions Expert Data Platform (MCSE). As a DBA, I design, install, maintain and upgrade all databases (production and non-production environments), I have practical knowledge of T-SQL performance, HW performance issues, SQL Server replication, clustering solutions, and database designs for different kinds of systems. I worked on all SQL Server versions (2008, 2008R2, 2012, 2014 and 2016). I am Microsoft® Certified Solutions Expert: Data Management Analytics plus Microsoft® Certified Solutions Expert Data Platform (MCSE).

Best Selling Products

Stellar Data Recovery Professional for Windows

Stellar Data Recovery has the right Windows Recovery tool for all your data recovery

Read More

Stellar Data Recovery Professional for Mac

Stellar Data Recovery for Mac program performs safe..

 

Read More

Stellar Photo Recovery

A comprehensive photo recovery software to restore photos, music & video files

 

Read More

Stellar Repair for Video

Powerful video repair tool for repairing corrupt or damaged MOV and other video files

 

Read More

1 comment

  1. Herman Shawn says:
    August 24, 2018 at 10:14 am

    Few days ago, I took backup of SQL Server Database (.bak file). When I try to access my backup file, it shows backup file corrupt error. I am using SQL Server 2008. How can I get rid of this situation?

    Reply

Leave a comment Cancel reply

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

  +  1  =  7

Table of Contents    

  1. Permissions needed:
  2. Restore database in SQL Server 2008 R2:

Categories

Related Posts

how to restore specific tables from sql database backup file
Toolkit for MS SQL

How to Restore Specific Table(s) from SQL Database Backup File?

Stellar Author Saba Zehra Rizvi November 16, 2021 Read More
How to Take SQL Server Database Backup Automatically
Toolkit for MS SQL

How to Take SQL Server Database Backup Automatically

Stellar Author Charanjeet Kaur August 12, 2021 Read More
Identify Corrupted SQL Backup File
Toolkit for MS SQL

How to Identify Corrupted SQL Backup File

Stellar Author Charanjeet Kaur February 24, 2021 Read More

Stellar Official Website

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

ALSO AVAILABLE AT

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

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

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!