Solved

How to identify difference between two databases' data changes?

Posted on 2013-01-23
6
347 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 333 total points
ID: 38813135
0
 
LVL 12

Assisted Solution

by:mwochnick
mwochnick earned 167 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 333 total points
ID: 38813179
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 38858899
Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now