Red Gate forums :: View topic - How can you read table data from your Sql backups.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK 10
SQL Comparison SDK 10 forum

How can you read table data from your Sql backups.

Search in SQL Comparison SDK 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
zaliis



Joined: 18 Mar 2014
Posts: 8

PostPosted: Wed Mar 19, 2014 5:18 am    Post subject: How can you read table data from your Sql backups. Reply with quote

When I attempt to create an instance of the BackupConnection using the default ctor I get the following error message

SQL Backup Reader may not be called from user code

I also tried using RegisterForDataCompare and opening the BackupConnection and that returns the exception

No filenames specified.


I need to do a schema and data compare between two SQL Server 2008 database backups. If I detect a schema or data difference I need to output the tables in the target database to a Sql CE sdf.

I have the code working to output the database schema I just need to know how to read all records from each table in the backup using the SDK.

I think I can also accomplish what I need if I can compare a sql backup to an empty folder. Then I could read the data I need from the table differences object. But every time I try that type of compare there are no table differences.


Thanks in advance.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6671

PostPosted: Thu Mar 20, 2014 12:50 pm    Post subject: Reply with quote

Hello,

You may be creating an object that does not have a constructor meant for public use. If you want to compare data in a backup, here is an example.

http://sdk.red-gate.com/index.php/Comparing_backup_to_live_database

Hopefully this is useful for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group