SQL Compare 7 Object Level Restore from Backup File
richie_e
Posts: 9
Hi I was wonderifing how I could use SQL Compare 7 to do an object level restore of a table from backup
I did a comparison of Live SERVER1 to backup file backup.sqb.
Backup.sqb has the table I want, which doesnt exist on Live SERVER1.
I go to the synchronize wizard, but it seems to want to restore a lot of other stuff with it. I chose ignore dependencies but still Im not confident that when I do the restore it will just get that table and nothing else.
Am I approaching this the right way or Is SQL Data Compare a better tool for this?
Any help would be greatly appreciated
Richard
I did a comparison of Live SERVER1 to backup file backup.sqb.
Backup.sqb has the table I want, which doesnt exist on Live SERVER1.
I go to the synchronize wizard, but it seems to want to restore a lot of other stuff with it. I chose ignore dependencies but still Im not confident that when I do the restore it will just get that table and nothing else.
Am I approaching this the right way or Is SQL Data Compare a better tool for this?
Any help would be greatly appreciated
Richard
Comments
To only sync 1 table, you uncheck ALL objects (click the NONE button on top right corner), then select ONLY the objects you want (1 table in this case)
I just did a comparison between SQB file and SQL 2005 Database, no problem there to selectively sync objects
DBA, MCITP
I ran the synchronisation and it only restored the schema of the object rather than the data contained in it.
Is this where Data Compare comes in to play?
Cheers
At this point in time, you would need to use the SQL Compare SDK to write a program to restore both the schema and data together. I should be able to put together a code sample for this be early next week.
I installed & launched SQL Data Compare 7, ran the same comparison between the db and the very same backup file.
I now get this error - the backup files is definitely valid because I was able to dig into it with SQL Compare in the first place!
The backup is encrypted , but this is not a problem usually with Compare 7 - Im just prompted to enter it.
Any help would be appreciated,
Richard[/img]
Redgate Software
I have posted some sample SDK C# code for a program that can restore both schema and data.
If you have a licence for the SQL Comparison SDK version 7.0, then you can build and use this example using Visual Studio. If you don't have a licence, then you should be able to build and use the code, but be restricted by a "nag requester" for 14 days.
The sample C# project is available here, click the object-level restore from database link.