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
Toolkit for MS SQL 4 minute read

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

Published on November 16th, 2021
Saba Zehra Rizvi
Written By
Saba Zehra Rizvi
Raja Jegan R
Approved By
Raja Jegan R

Summary: In this post, we have mentioned the ways to restore specific tables from a SQL database backup file. In addition, we have mentioned an advanced SQL backup recovery tool that can help in restoring specific tables from .BAK file, even if it is corrupted.

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

Contents

  • How to Restore Specific Table(s) from SQL Database Backup File?
  • Drawback of Using the Manual Method
  • An Alternative Solution
  • How to Use Stellar Backup Extractor for MS SQL?
  • Conclusion

MS SQL does not provide any in-built functionality to directly restore specific tables from the backup file. However, you can restore the entire SQL backup by using SQL Server Management Studio (SSMS) or T-SQL commands. After that, you can copy the specific tables to your database. In this post, we’ll be discussing the process to restore specific tables from SQL database backup file.

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

After restoring the database backup to a new database, you can copy the specific tables to destination database. Below, we’ve mentioned process to restore specific tables based on three scenarios.

Scenario 1: When rows are deleted and tables still exist

You can use the following code in SSMS wherein you can combine the INSERT command with the SELECT command. This will only add the missing rows to the table in the original database:

USE My_Database
GO
SET IDENTITY_INSERT my_table ON
INSERT INTO my_table_1 (column_name)
SELECT * FROM My_Database_Restored.my_table
SET IDENTITY_INSERT my_table OFF

Scenario 2: When the table was completely dropped and needs to be completely recreated

You can use the following code with the SELECT INTO command for copying the rows and table structure to the original database.

USE My_Database
GO
SELECT * INTO my_table
FROM My_Database_Restored.my_table

Scenario 3: When the table has a few damaged rows due to an update or an unwanted event

You can use the following code with the MERGE command for updating the damaged data, inserting the missing data, and deleting the unnecessary rows in the table.

USE My_Database
GO
SET IDENTITY_INSERT my_table ON
MERGE my_table dest
USING (SELECT * FROM My_Database_Restored. my_table src) AS src
ON dest.(column_name_1)= src.(column_name_1)
WHEN MATCHED THEN UPDATE
SET dest. (column_name_2) = src. (column_name_2), dest. (column_name_3) = src. (column_name_3)
WHEN NOT MATCHED THEN INSERT
(column_name_1,column_name_2,column_name_3) VALUES
(src. (column_name_1), src. (column_name_2), src. (column_name_3));
SET IDENTITY_INSERT my_table OFF

If there are any indexes, views, constraints, triggers, or rules functions in your table, you may have to recreate them if needed. Along with this, you may have to address the referential integrity issues manually. To check the data integrity, use the following command:

DBCC CHECKTABLE (“my_table”)

Drawback of Using the Manual Method

In the above technique, you need to restore the entire database backup to retrieve only one or some specific tables. This procedure can take a long time and require a lot of free space on the SQL Server. Also, if the backup file is corrupt, you may not be able to retrieve the data.

An Alternative Solution

If your backup file gets corrupt, you may not be able to restore any of your table(s). In such a case, you can use Stellar Backup Extractor for MS SQL module from Stellar Toolkit for MS SQL, which can help you restore specific tables from .BAK file.

free download

How to Use Stellar Backup Extractor for MS SQL?

Let’s explore the steps to recover tables from SQL database backup file by using the software:

  • Download and launch the Stellar Toolkit for MS SQL and select the Stellar Backup Extractor for MS SQL module.
  • A dialog box will open. You can use the ‘Browse’ open to select the file (if you know the location) or use the ‘Search’ option to locate the .bak file in your system.
home page
  • Choose the file from which you want to extract data and click Scan.
scan mode
  • After clicking the Scan, select any of the given modes:
    • Standard Scan (Recommended) – This mode scans and repairs normal corruption in .BAK file.
    • Advanced Scan – Use this mode when you do not get desired result after Standard scan. This mode scans the severely corrupted .BAK file.
scan options
  • Now, you will get a new dialog box, ‘Select Backup Set’. This will display the backups if they are stored in different files.
  • Select the Backup Set and click ‘Next’.
backup set
  • When the repair is completed, you will get a ‘Repair Complete’ dialog box.
  • You can see the preview of the repaired files.
file preview
  • Now, you can select the tables you want to save and then click ‘Save’.
  • A new dialog box comes up, displaying multiple saving options – MDF, CSV, HTML, and XLS.
  • Select the saving option as MDF and enter the required details.
save database options
  • Choose the destination for saving the file and click ‘Save’.
  • The ‘Save Complete’ dialog box appears when the data is successfully saved.
save complete

Conclusion

In this post, we have outlined the solutions to restore specific tables from SQL Server backup file. You can restore the tables from a SQL Server backup file using the manual method mentioned in this post. However, the manual method is time-consuming, complex, and may not bring the desired results. Alternatively, you can use Stellar Backup Extractor for MS SQL, which is a part of Stellar Toolkit for MS SQL, to selectively restore the tables from backup (.BAK) file.

About The Author

saba

Saba Zehra Rizvi is Content Team Lead at Stellar. She specializes in providing solutions for issues related to Outlook, Excel, Access, and SQL. She also has a knack for writing process-based blogs, articles, and knowledge base on file conversion tools, such as GroupWise, OLM, NSF, MBOX and others. She also guides her team on strategizing the content and time management

Best Selling Products

Stellar Data Recovery Professional for Windows

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 Professional for Mac

Stellar Data Recovery for Mac program performs safe..

 

Read More
Stellar Photo Recovery

Stellar Photo Recovery

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

 

Read More
Stellar Repair for Video

Stellar Repair for Video

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

 

Read More

Leave a comment Cancel reply

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

42  −  40  =  

Table of Contents    arrow

  1. How to Restore Specific Table(s) from SQL Database Backup File?
  2. Drawback of Using the Manual Method
  3. An Alternative Solution
  4. How to Use Stellar Backup Extractor for MS SQL?
  5. Conclusion

Categories

offer banner

Related Posts

related post
Toolkit for MS SQL

How to Take SQL Server Database Backup Automatically

Stellar Author Charanjeet Kaur August 12, 2021 Read More
related post
Toolkit for MS SQL

How to Identify Corrupted SQL Backup File

Stellar Author Charanjeet Kaur February 24, 2021 Read More
related post
Toolkit for MS SQL

How to Recover SQL Server Database from a Corrupt Backup File?

Stellar Author Charanjeet Kaur April 9, 2020 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!