Code to compare backups in C#

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

Code to compare backups in C#

Postby mturaga » Fri Dec 04, 2009 7:17 pm

Is there any resources for comparing the backups.
I wanted to do a
Differences dbSourceVsdbTarget = dbSource.CompareWith(db, Options.Default);

where db is a backup , How do I instanciate the backup datasource in the db above?. db is a backup location as in widgetdev.bak
mturaga
 
Posts: 1
Joined: Fri Dec 04, 2009 7:13 pm

Postby Brian Donahue » Mon Dec 07, 2009 3:49 pm

Hello Maruthi,

If you are simply looking for an example of comparing the schema of a backup file to a live database, a sample is available here:
http://labs.red-gate.com/index.php/Compare_to_Backup

It shouldn't be too much of a leap to modify this to compare two backups if that's what you need to do. Lots of code examples are available on the labs website.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests