Wednesday, March 7, 2012

backup and restore of replicated dbs

We are moving some dbs off of some server. Some databases are publishers
while some are subscribing . There are some thats a combination i.e they
publish some and subscribe to some.. different tables
I have done a full backup of all these databases and have restored them on
the new server. I have also generated the script to recreate all the
publications. Do i just apply them ? When i backup and restore a published
database, does it copy over all the article,publication definitions or does
it not ?
Hassan,
if there's any remaining replication metadata, just run
sp_removedbreplication before running your script. The script usually needs
modifying as the servername will need changing if the new server has a
different name and potentially job owners will need changing if they weren't
originally sa.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
I just backed up a published database and restored it and I dont see all the
replicated objects carried over. So i dont need to run any
sp_removedbreplication right ?
Is that by default that backup and restores dont copy the replicated
objects/properties ?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ucJIWORXFHA.3320@.TK2MSFTNGP12.phx.gbl...
> Hassan,
> if there's any remaining replication metadata, just run
> sp_removedbreplication before running your script. The script usually
needs
> modifying as the servername will need changing if the new server has a
> different name and potentially job owners will need changing if they
weren't
> originally sa.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||hassan,
it depends. As far as I recall, the publication settings are preserved if
you restore to the same server but not otherwise.
Rgds,
Paul Ibison
|||I did restore on the same server and it did not preserve it.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23%23oOhNXXFHA.1508@.tk2msftngp13.phx.gbl...
> hassan,
> it depends. As far as I recall, the publication settings are preserved if
> you restore to the same server but not otherwise.
> Rgds,
> Paul Ibison
>
|||It preserves them when you restore to another server.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:Ovtr9fZXFHA.616@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> I did restore on the same server and it did not preserve it.
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:%23%23oOhNXXFHA.1508@.tk2msftngp13.phx.gbl...
if
>
|||My guess is that you are doing something extra which wasn't included in your
post. There are a few variables here which account for what you have seen -
server the same or different, enabled for replication or not, restoring as
the same name or not, already publishing on the second server or not...
My guess is that you perhaps restored the database as a different name on
the same server? If so, you'll lose the replication settings and they'll be
preserved if the same name is preserved.
Restoring to another server doesn't really matter if it retains the
replication settings or not - sp_removedbreplication can be used to remove
if they do occur. In any case it'll not be useable as the servername is
hardcoded into too many metadata places. On the other hand, if the other
server has the same name and is enabled as a distributor then I could see
this working.
Rgds,
Paul Ibison
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%235Z$w2cXFHA.628@.tk2msftngp13.phx.gbl...
> It preserves them when you restore to another server.
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:Ovtr9fZXFHA.616@.TK2MSFTNGP12.phx.gbl...
> if
>

No comments:

Post a Comment