SQL SERVER – Why One Table Cannot Be Deleted From a Backup File

You can’t Delete a Single Table by editing a SQL Server backup file. I keep the original backup intact.

An intact sealed case remains beside a separate staging tray and a new open destination case.

Restore into a separate staging database if a new backup must exclude a table. Review dependencies before removing it there. Then create and test a new backup. Don’t drop a production table to reduce backup size.

For storage size, assess backup compression on the supported edition and release. It can reduce space and I/O. It doesn’t remove tables, erase sensitive data or guarantee a ratio. Compression isn’t universally enabled by default.

I heard this question during an interview. Changing a database and changing an existing backup are different operations. The existing backup remains a record of the database when it was taken.

A new backup without one table doesn’t erase older copies. Copied media, snapshots and restore chains can retain that data. Treat retention and data removal as separate policies.

Related reading

A backup file is not an editable table container, it is a recovery artifact.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Backup and Restore, SQL Server
Previous Post
SQL SERVER – The SaveToSQLServer Method has Encountered OLE DB Error Code 0x80040E4D
Next Post
SQL SERVER – Connecting Specific Database on Starting SSMS

Related Posts

4 Comments. Leave new

  • Sanjay Monpara
    October 5, 2017 11:02 am

    Oracle gives option to take backup without data (schema only), is there any way to do so in sql server?

    Reply
  • Another way is restore db as a new from the backup, delete table and backup the new db )))

    Reply
  • I got surprised , is it actually possible to delete a table from bak file .. after reading this . i just thanked god .. it should not happen even ..:)

    Reply

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.