Link to home
Start Free TrialLog in
Avatar of rocky_lotus_newbie
rocky_lotus_newbieFlag for India

asked on

Merge Replication - Help needed

We have merge replication supported on a cluster, the primary server failed over to the secondary. After that, there might be some changes made to the data by the application during and after the failover happened, so all the changes could have been done on the subscriber database (not sure if there are any changes). Now the business would like to know if there were any changes on the subscriber database data, if it happened, they want to know what are the changes and whether those changes got replicated to the publisher database. Can any one please help me as to how I can find that? BTW, we have SQL 2008 R2 Enterprise on Windows 2008 R2 Enterprise. Please let me know if you need any additional information. Thanks.
Avatar of rocky_lotus_newbie
rocky_lotus_newbie
Flag of India image

ASKER

And we have immediate updating set up for the merge replication
Avatar of Marten Rune
Quote: "cluster, the primary server failed over to the secondary"

When the cluster fail over, the recieving node starts by running through the logfiles, committed actions will be committed, actions not committed will be rolledback, using rollback information in the log. So all databases (noregards to merge replication) will be in a cosistent state before they are initialized and accessable.

After that the merge replication does it's stuff.

So the answer id NO, there will not be any changes to the subscriber database thats not in the publisher database.

What can happen is a transaction in transition will be aborted before commit, and is rolled back. The immediate updating set will update WHEN the transaction is committed in the log file. This is NOT the same thing as written into the database. But since the recieving node reads through the logfile, this transaction will be committed and written into the database and thereby subscriber and publisher databases are in a synced state.

Regards Marten
Thanks for the reply Marten. The publisher and subscriber are indeed in sync.
Can you please let me know as to how I can find the specific records that might have been inserted or updated or deleted on the subscriber by the application after and during the failover? Please let me know if you need any additional info.
These are also in sync. There is no problems with the databases due to a cluster failover. It's designed to be robust. There are no differenses in finding inserted, delted or updated records. If this is a requisit of the database it can be solved by triggers on the tables. But this is a totally different topic. Do you need references for creating alog/history table using triggers???
We didn't have any issues from the database standpoint due to the failover. But the Business requested for the data changes made at the subscriber from the application for validating it.
The failover happened between 10 AM and 11 AM EST yesterday, So can you please let me know as to how I can provide those specific data records  to the business?
You need to save all log files created beween 10AM and 11AM. Then you need some application to analyze these.
Backupfiles with logbackup works as I understand it.

lumigent log explorer should work, I only read up quick just now. Other suggestions here:
https://www.experts-exchange.com/questions/21514026/Good-SQL-Server-Transaction-Log-Analysis-Tool.html

//Marten
The log explorer seems replaced with Audit DB
http://www.lumigent.com/company/news/lumigent-technologies-releases-audit-db%C2%AE-65

Havent tried but I think I will.

//Marten
ASKER CERTIFIED SOLUTION
Avatar of rocky_lotus_newbie
rocky_lotus_newbie
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure what's the answer to this question