Thursday, March 8, 2012

Changing publisher for Merge Replication

We have a database application that is currently being replicated to 2
remote sites. In the near future, I expect that this will increase to many
more sites. My question is this, as we move forward it is probable that at
some time we will run into the need to replace the server that currently
functions as the publisher server. Is there some way to change all of the
publications to use a different server without having to remove replication
and reinstalling it?
TIA
Ron Lounsbury
Ron,
in my experience it is only possible to migrate replication databases from
one server to another if the server names are identical. If they are not,
then the best thing to do is to script out replication, change the
references to servernames and job owners appropriately, drop the 'old'
publications on the old server then recreate the publications on the new
server.
Another poster ran into this type of issue after restoring a merge published
database to another server and found when he tried to add a column he got
the error: 21260 "Schema replication failed because database '%s' on server
'%s' is not the original Publisher of table '%s'".
I investigated this and in sysmerge articles there is a publisherid. This
ID needs to have a corresponding record in sysmergepublications. However, in
sysmergepublications, the 'publisher' column needs to match the servername,
which it didn't in his case as he had restored to another servername. So the
problem is that the replication metadata tables 'hardcode' the original
server name.
HTH,
Paul Ibison
|||Paul
Thanks for the response. It's not what I wanted to hear, but I was
pretty much expecting it. One of the problems we will have is that not all
of our subscribers are connected at any given time, making it a bit
difficult to push the database out again. Also, there is a certain amount
of time (@.20 min or so) that the subscriber can't use the system while we
are doing this. Oh well, as I said, I was afraid that this would be the
answer.
Ron L
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O6cJxkJeEHA.3476@.tk2msftngp13.phx.gbl...
> Ron,
> in my experience it is only possible to migrate replication databases from
> one server to another if the server names are identical. If they are not,
> then the best thing to do is to script out replication, change the
> references to servernames and job owners appropriately, drop the 'old'
> publications on the old server then recreate the publications on the new
> server.
> Another poster ran into this type of issue after restoring a merge
published
> database to another server and found when he tried to add a column he got
> the error: 21260 "Schema replication failed because database '%s' on
server
> '%s' is not the original Publisher of table '%s'".
> I investigated this and in sysmerge articles there is a publisherid. This
> ID needs to have a corresponding record in sysmergepublications. However,
in
> sysmergepublications, the 'publisher' column needs to match the
servername,
> which it didn't in his case as he had restored to another servername. So
the
> problem is that the replication metadata tables 'hardcode' the original
> server name.
> HTH,
> Paul Ibison
>

No comments:

Post a Comment