Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to identify difference between two databases' data changes?

Posted on 2013-01-23
6
Medium Priority
?
392 Views
Last Modified: 2013-02-06
I've existing DB called A. I created another DB called B from the backup of A.

I do modification in both databases. Say for example, in database A, in tableA some rows has been inserted. In database B, in tableA some rows has been deleted/modified.

I would like to know the data changes between the two databases. How to identify them? Is there any FREE tool existing for that? Or any other way existing to identify this? Or If I want to implement new tool what approach I've to follow?

Please do guide me.

Note: I'm using SQL SERVER 2008 R2.
0
Comment
Question by:Easwaran Paramasivam
  • 3
  • 2
6 Comments
 
LVL 9

Assisted Solution

by:selva_kongu
selva_kongu earned 999 total points
ID: 38813135
0
 
LVL 12

Assisted Solution

by:mwochnick
mwochnick earned 501 total points
ID: 38813138
without more detail about the number of tables, the structure of the tables its hard to give direction - but assuming 1 table in each database you could
1. write sql script to dump the data from each table in the same format to a csv file (if the columns allow it) and then use a tool like winmerge to compare the two output files for differences note that your export sql should both set column order and sort the data
2. you could write a SQL script to find all of the rows in table A that are not in table B and vice versa and then for the remaining rows process each column that could've changed in a loop where the key fields match
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38813164
Found sqldelta is useful. It is commercial one. Any such kind of free tool available?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38813176
If no free tool available, I would like to create my own tool. Please guide me how to achieve that?
0
 
LVL 9

Accepted Solution

by:
selva_kongu earned 999 total points
ID: 38813179
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 38858899
Thanks.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question