Andras

Software Architect - Red Gate Software

SQL Compare 7 Beta and peeking into SQL Server backup files

Published Friday, March 28, 2008 10:51 AM

I want to restore only a single table from my database backup. We have been hearing this request from many of our SQL Backup customers. The problem is simple: Given a large database backup and a live database that has a partial “corruption”, e.g. the data in a single table has been accidentally modified and committed, the DBA would like to have the table, and nothing else, restored. Or, another example is when a particular stored procedure has been modified, and we would like to get back the original version. This problem is a bit worse if we do not even know which backup file contains the right information.


In SQL Server the only way to solve the above problem is to restore the whole backup file to a new database, and copy the table data or the stored procedure to the current database.


Well, this problem is now history. We have just released the first public beta of SQL Compare 7. This tool, which is primarily used for comparing and synchronizing two database schemata, can now read the schema information directly from a backup file. This complements well SQL Data Compare 6.1 which already has this feature at the data level. These two products open up a lot of new recovery opportunities.


If you want to restore a few stored procedures, you just compare your live database with a backup file, and you can explore the differences in your schema objects. It may be that the modified stored procedure has a few dependent stored procedures that you also wish to restore. After selecting all the schema objects you wish to retrieve from the backup files, you can either restore them or create and save a synchronization script. When it comes to tables, Data Compare can do even more. Not only can you restore the data in a particular table, you can do this at a much finer level of granularity. First, you can see the differences between a table in the backup and the live database, and you can control which individual rows should be restored.


Anyway, back to SQL Compare 7 Beta 1. You can download it from http://www.red-gate.com/messageboard/viewtopic.php?t=6730


It was quite a challenge to implement reading schemata information from backup files. First, the core system tables are different in SQL Server 2000, 2005 and 2008. Some objects, like XML schema collections, have very cryptic representations, and there is of course backup compression in SQL Server 2008. We are still working on row and page compressions. Of course we support Red Gate’s SQL Backup files, both compressed and encrypted ones, but the tool works with SQL Server’s native backups just as well.


Another major feature for this beta is support for SQL Server 2008. Although we will not see SQL Server 2008 RTMed until at least Q3 2008, when it is out, we hope to have SQL Compare 7 ready and waiting for it. In the meantime, you are encouraged to download and try this beta. Please let us know if you find any issues with it, or if you think that there is something we have missed from this product. The forum for this beta is on http://www.red-gate.com/messageboard/viewforum.php?f=78

 

Regards,

  Andras

by András

Comments

 

nezza said:

Andras,

Great stuff. I've been evaluating SQL Data Compare 6 for a tricky backup scenario. The LIVE database is massive, (4-5GB, backups even come out at 1-2GB), and on a server that separate to our own network, requiring a secure VPN client to access.

Rather than try and copy over backups we're look ing at establishing a connection and running SQL Data Compare to tell us what's changes and synchronize. Hopefully we can automate everything too.

Miles easier!
April 3, 2008 2:22 AM
 

BobMN said:

nezza,
Not meaning to poke fun at your post but keep in mind 4-5GB is peanuts at best in todays world.  I wouldn't even use the word massive until you hit 100's of terabytes. Granted it's all relavtive to the eyes of the beholder.

More to the point of my post.  I would be curious to see how it works on a larger database of at least a terabyte or even something greater than 100 terabytes.   I would assume the tool and/or Windows to go to it's knees.
April 27, 2008 9:43 PM
You need to sign in to comment on this blog

About András

András is the architect of SQL Compare versions 4, 5 and 6, SQL Log Rescue and SQL Refactor. He is focused on database internals, database synchronization and database schema evolution.

















<March 2008>
SuMoTuWeThFrSa
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
Identity Columns
 When Nigel Rivett takes us on a tour of the apparently innocuous subject of Identity Columns in TSQL,... Read more...

The Why and How of .NET Profiling
 Amirthalingam Prasanna gives a simple and practical guide about why you need to profile your .NET... Read more...

Execution Plan Basics
 Every day, out in the various discussion boards devoted to Microsoft SQL Server, the same types of... Read more...

NET Performance Cribsheet
 Robyn and Phil tackle the topic of how to make .NET applications perform well. As usual, they try to... Read more...

SQL Code Layout and Beautification
 William Brewer takes a look at the whole topic of SQL Code layout and beautification, an important... Read more...