Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Looking for a data compare tool

Author  Topic 

sync00
Starting Member

24 Posts

Posted - 2011-01-03 : 11:30:59
I'm looking for a tool that can take a snapshot of the database and then compare a changed version of the database to the snapshot and show every record that is new, deleted or changed.

My searching shows that SQL Server has a snapshot feature. I am not referring to that. Although I don't know anything about SQL Server snapshots so I suppose it is possible the tool might use that feature.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-01-03 : 12:47:54
Look for Red Gate Data Compare. If you have Visual Studio 2010, or 2008 Database Edition, it also has a data comparison feature.
Go to Top of Page

sync00
Starting Member

24 Posts

Posted - 2011-01-03 : 14:46:34
Thanks. I'll check those out.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-01-04 : 04:16:41
Might depend a bit what you want the "comparison" for?

Its easy enough to compare a table in Database-A with one in Database-B (which is, say, your "old" version). So if you want the data displayed to end users within your application, say, then building-your-own is relatively simple.

But for a one-off exercise, say, then Red Gate Compare will do a fine job.

So ... depends a bit on how you want to use the comparison
Go to Top of Page

sync00
Starting Member

24 Posts

Posted - 2011-01-04 : 11:01:42
The purpose is to help me figure out how the database works. This is a point of sale system and the vendor does not provide documentation for the back end. I need to write reports and utilities for the back end and have to figure out how it works.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-01-04 : 11:20:40
You can use "SQL Profiler" to spy on the system. That will show you all SQL statements sent to the server for execution. You can filter it - e.g. to just your connection - so you can see that if you do operation-X that causes SQL-Y (or SQL-A, SQL-B and SQL-C) to be sent to the server for execution.

If you are able to change the database (licence might disallow it?) you could add a TRIGGER to some/all tables. That trigger could just save the "BEFORE" (or "AFTER") data into Audit Tables (in another database if you like). These would show how the data for a particular record had changed over time. I don't think this would be useful for what you describe, but given that you original mentioned using a database-snapshot comparison then maybe knowing each set of values that a record changed through, over time [including the actual time the change was made] that might help.
Go to Top of Page

sync00
Starting Member

24 Posts

Posted - 2011-01-04 : 12:47:53
The profiler sounds interesting. However I'm not proficient with SQL and would find it easier to use a data compare tool.
Go to Top of Page

sync00
Starting Member

24 Posts

Posted - 2011-01-13 : 15:19:50
I now have a data comparison tool. When I used one in the past it was simple to copy the database for comparison purposes because it just meant copying a file.

Is there a simple way to copy a SQL Server database?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-01-13 : 17:27:26
Which tool are you using? Red Gate doesn't need to copy the database to do the comparison.

If you prefer to work on a copy the best way to do it is to take a full database backup and restore it on another server. Books Online has the syntax for the BACKUP command.
Go to Top of Page

sync00
Starting Member

24 Posts

Posted - 2011-01-13 : 19:08:09
That feature of Red Gate sounds very useful.

I went with a product from DB Balance because it also supports Access databases.

There is no second server to restore to but I can restore to a new db.

Thanks.
Go to Top of Page

fenixtx119
Starting Member

2 Posts

Posted - 2011-03-10 : 12:38:33
unspammed
Go to Top of Page
   

- Advertisement -