Solved

How to manaully Sync the subcriber data in Disaster

Posted on 2012-04-05
10
411 Views
Last Modified: 2012-06-11
Dear Experts

there is a problem in the replciation and i want to update my publisher from the subscriber backup

can you please suggest if there is any way to do the same manually.

Best regards
Shailesh
0
Comment
Question by:Solutions4Problems
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 15

Expert Comment

by:Anuj
ID: 37809787
First, run tablediff utility to find the difference in data and copy this difference to a table (this is for backup purpose if anything went wrong). The option is to reinitialize your subscription, here you have the options Upload unsynchronized changes from the subscribers before reinitialization. Once the changes are uploaded the merge agent will overwrite the subscriber data with the punlisher, This applies only for merge replication.
0
 
LVL 42

Expert Comment

by:Eugene Z
ID: 37810195
..script publisher\subscriber (later you need it to recreate publication)
1. have a good backup of publisher and subscriber DBs
2. drop subscription and publication
3. update publisher from the subscriber backup (please clarify -... if it is table copy, db restore , etc)-- if db restore you mayneed to do some extra steps  -
4.make sure your  "to be again" publisher db \tables look as you expect
5. recreate publication\subscription(s)

------------------
BTW:  what repilcation are you using ? is it snapshot publication?
0
 

Author Comment

by:Solutions4Problems
ID: 37810339
I am using merge replciation and the steps you have suggested is not possible as the data is updated at both the ends

regards
shailesh
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 15

Accepted Solution

by:
Anuj earned 167 total points
ID: 37810370
The option i see is to reinitialize the subscription with " Upload unsynchronized changes from the subscribers before reinitialization".
0
 
LVL 6

Assisted Solution

by:SJCFL-Admin
SJCFL-Admin earned 166 total points
ID: 37811111
I have had many cases where the merge replication would not let me upload changes from the subscriber.  In that case, you have to let it re-initialize the subscription.  but if you could restore the backup to another instance and do the tablediffs as described by anujnb, you could develop scripts to apply the changes to the publisher and that would cause them to replcate again down to the subscribers.  (Or you could manually write T-SQL using EXCEPT logic to effect the same types of compares and feed the results to INSERT or UPDATE statements to automatically apply the changes. But whatever you do, you would be responsible for understanding the data and preventing the introduction of errors into the process.)
0
 
LVL 42

Assisted Solution

by:Eugene Z
Eugene Z earned 167 total points
ID: 37814410
try conflict resolver
Advanced Merge Replication Conflict Detection and Resolution
http://msdn.microsoft.com/en-us/library/ms151257(v=sql.100).aspx
0
 

Author Closing Comment

by:Solutions4Problems
ID: 38061551
###
0
 
LVL 6

Expert Comment

by:SJCFL-Admin
ID: 38062098
One thing I have found over the years is that what users ask for isn't usually a good thing to give them if I have not checked out the full scope of the effect.  One of the reasons i like the table diffs is that it will give you a heads up as to whether any other changes are going to be made other than what you are expecting.  I've aften been requested to do a full restore only to discover that the request was made totally ignoring another oeprational area that would have been adversely impacted if I have done a full restore.

I am also not sure how conflict resolver plays in here.  That only identifies conflicts Sql Server cannot resolve if two changes are made to the same entity at the same time and Sql Server could not determine who should win. (Unless I am missing a capability that I am unaware of and would be extremely interested in exploring further...)
0
 
LVL 42

Expert Comment

by:Eugene Z
ID: 38064304
Solutions4Problems:
please read EE help about C grade -- it is like to say somethin bad to people who try to help you
So not nice  :(

if you got it - try to change your grade
0
 
LVL 6

Expert Comment

by:SJCFL-Admin
ID: 38069728
Perhaps it is our obsession about metrics that needs to change :-)   Sometimes we will give a user exactly what they want and sometimes we won't.  The is that old saying that if you are not making mistakes, you aren't doing anything.  Or at least, you are not trying to expand your horizons.

So what is wrong if we do not always get an A ?  Why should we be evaluated only on a grade rather than the content of what we said or the fact that we tried to help.

But then I stopped participating in peer code reviews whan management decided they needed to be 'measured' for 'flaws'.  That immediately ended the free flow discussion of what might have been done or techniques that could be sued the next time. Instead, it became a tool for scoring points against those you disliked and adding points for those you did.  All by whether or not you listed the 'flaws' you found...  But management , in particular, like easy answers they can poinit to for the illusion of quality control and objectivity.  I have not met an 'objective' measurement yet that could not be corrupted once people knew it was being measured...

Sorry for the long reply.  I wish people could acccept that grades are relative to peoples expectations and sometimes their expectations can't be achieved as they want...
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell help for creating accounts 283 58
T-SQL to copy a database 37 67
SQL Instance service gone? 5 39
SQL Server code help needed 14 35
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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

696 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