SQL Compare 7 Object Level Restore from Backup File

richie_erichie_e Posts: 9
edited August 4, 2008 1:17PM in SQL Compare Previous Versions
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

Comments

  • As far as I know, SQL Compare has always been on the Object level (table, view, stored procedure, role, etc...)

    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
    Jerry Hung
    DBA, MCITP
  • Thanks

    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
  • Yes - SQL Compare restores database schema. SQL Data Compare is for restoring data within tables, which can be done on a per-row basis.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    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.
  • Hi

    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.

    screenshot.JPG

    Any help would be appreciated,
    Richard[/img]
  • Michelle TMichelle T Posts: 566 Gold 1
    SQL Data Compare currently has a problem with encrypted backups. We're fixing it and 7.1 will be able to handle them properly. Apologies for the inconvenience :oops: . We're trying to arrange an interim build that we can send you (and anyone else who's affected by the problem) as it's just a problem in the UI so the fix shouldn't affect anything else.
    Software Developer
    Redgate Software
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi all,

    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.
Sign In or Register to comment.