How to manaully Sync the subcriber data in Disaster

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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AnujSQL Server DBACommented:
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.
EugeneZ ZhitomirskySQL SERVER EXPERTCommented:
..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?
Solutions4ProblemsAuthor Commented:
I am using merge replciation and the steps you have suggested is not possible as the data is updated at both the ends

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

AnujSQL Server DBACommented:
The option i see is to reinitialize the subscription with " Upload unsynchronized changes from the subscribers before reinitialization".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.)
EugeneZ ZhitomirskySQL SERVER EXPERTCommented:
try conflict resolver
Advanced Merge Replication Conflict Detection and Resolution
Solutions4ProblemsAuthor Commented:
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...)
EugeneZ ZhitomirskySQL SERVER EXPERTCommented:
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
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...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.