Showing posts with label publication. Show all posts
Showing posts with label publication. Show all posts

Monday, March 12, 2012

Restore publication db

Hello All -
When trying to restore the publication database, I am losing the
publication! ( Running merge replication, SQL Server 2000, push
subscriptions).
I am using the RESTORE command as follows:
RESTORE DATABASE CDB FROM DISK = 'c:\temp\somefile.bu'
WITH KEEP_REPLICATION
I had a 'successful' return from running the above command.
When I open EM \ DB \ Replication, my publication is gone. The merge
agents are there but if I try to reinit, it tells me that the publication
does not exist.
What am I doing wrong?
Thanks,
bruce
Something is strange here. This should work. Does the server you are doing
your restore on have replication installed on it?
What happens if you enable the database you are going to restore to for
merge replication and then do the restore with the keep_replication switch?
"rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
news:JUREc.10114$oW6.1420194@.twister.nyc.rr.com...
> Hello All -
> When trying to restore the publication database, I am losing the
> publication! ( Running merge replication, SQL Server 2000, push
> subscriptions).
> I am using the RESTORE command as follows:
> RESTORE DATABASE CDB FROM DISK = 'c:\temp\somefile.bu'
> WITH KEEP_REPLICATION
> I had a 'successful' return from running the above command.
> When I open EM \ DB \ Replication, my publication is gone. The merge
> agents are there but if I try to reinit, it tells me that the publication
> does not exist.
> What am I doing wrong?
> Thanks,
> bruce
>
>
>
|||Bruce,
are you restoring to a different server. If the servername is different,
this is normal behaviour in my experience as the servername is entered into
several metadata tables eg 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 doesn't in this case as you have restored to another servername. In
this case you need to script out the publications on the initial server,
modify the scripts and then reapply them on the second server.
HTH,
Paul Ibison
|||Hillary -
I have merge replication working on the publication database ( publication &
distribution on same machine). I then stop all agents to get exclusive
access to the db. I run the restore command with the KEEP_REPLICATION flag.
When I go to reinit all subscribers, the publication is gone.
I'm not sure of your question

> What happens if you enable the database you are going to restore to for
> merge replication and then do the restore with the keep_replication
switch?
I am backing up the publication database and then restore the publication
database.
Regards,
bruce
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uTGIZ$1XEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Something is strange here. This should work. Does the server you are doing
> your restore on have replication installed on it?
>
> What happens if you enable the database you are going to restore to for
> merge replication and then do the restore with the keep_replication
switch?[vbcol=seagreen]
> "rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
> news:JUREc.10114$oW6.1420194@.twister.nyc.rr.com...
publication
>
|||Paul & Hillary-
Thanks for the replies.
That's it! I am restoring a backup from the production machine to my
developement machine.
I guess to do this I should use the scripting repl. wizard to create the
repl setting on the development machine. Oh the tangled web we weave...
Regards,
bruce
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eC$UYE2XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Bruce,
> are you restoring to a different server. If the servername is different,
> this is normal behaviour in my experience as the servername is entered
into
> several metadata tables eg 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 doesn't in this case as you have restored to another servername.
In
> this case you need to script out the publications on the initial server,
> modify the scripts and then reapply them on the second server.
> HTH,
> Paul Ibison
>
|||again this should restore your merge publications intact.
To go over the steps you have a production machine and a test machine.
replication is installed on both of them. You have two databases which are
enabled for merge replication. You back up the existing production merge
replication database and restored it to a database which is enabled for
merge replication in the test environment.
Your merge replication publications (but not the subscriptions or agent
info) is restored into the test database.
"rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
news:PMTEc.10124$oW6.1440077@.twister.nyc.rr.com... [vbcol=seagreen]
> Paul & Hillary-
> Thanks for the replies.
> That's it! I am restoring a backup from the production machine to my
> developement machine.
> I guess to do this I should use the scripting repl. wizard to create the
> repl setting on the development machine. Oh the tangled web we weave...
> Regards,
> bruce
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:eC$UYE2XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> into
> This
However,[vbcol=seagreen]
> in
> servername,
servername.
> In
>
|||Yes that is the scenario.
It seems that the BACKUP command should have a NOT_FOR_REPLICATION flag or
something similar. In order to skip the replication backup.
Thanks again for the replies.
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:eTCpL02XEHA.1000@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> again this should restore your merge publications intact.
> To go over the steps you have a production machine and a test machine.
> replication is installed on both of them. You have two databases which are
> enabled for merge replication. You back up the existing production merge
> replication database and restored it to a database which is enabled for
> merge replication in the test environment.
> Your merge replication publications (but not the subscriptions or agent
> info) is restored into the test database.
> "rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
> news:PMTEc.10124$oW6.1440077@.twister.nyc.rr.com...
weave...[vbcol=seagreen]
different,[vbcol=seagreen]
publisherid.[vbcol=seagreen]
> However,
> servername.
server,
>

Friday, March 9, 2012

Restore of Publication Database caused error

Dear All,
We are currently using Transactional Replication for a Warm Standby.
We needed to perform a restore of out Publication Database last night and
now we are getting the error :-
DATE/TIME:07/04/2005 09:50:29
DESCRIPTION:Error: 14151, Severity: 18, State: 1
Replication-Replication Transaction-Log Reader Subsystem: agent
INVEST1-ParisProduction-12 failed. The process could not execute
'sp_repldone/sp_replcounters' on 'INVEST1'.
COMMENT:One of the replications has failed, sort it out
JOB RUN:(None)
My normal fix for this would be to re-synchronise, but as the publication is
rather big I was wondering if there was a better way of doing it.
Thanks
Peter
try sp_replrestart or sp_repldone (EXEC sp_repldone @.xactid = NULL,
@.xact_segno = NULL, @.numtrans = 0, @.time = 0, @.reset = 1)
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
|||Thanks Guys,
Peter
"Peter Nolan" wrote:

> Dear All,
> We are currently using Transactional Replication for a Warm Standby.
> We needed to perform a restore of out Publication Database last night and
> now we are getting the error :-
> DATE/TIME:07/04/2005 09:50:29
> DESCRIPTION:Error: 14151, Severity: 18, State: 1
> Replication-Replication Transaction-Log Reader Subsystem: agent
> INVEST1-ParisProduction-12 failed. The process could not execute
> 'sp_repldone/sp_replcounters' on 'INVEST1'.
> COMMENT:One of the replications has failed, sort it out
> JOB RUN:(None)
> My normal fix for this would be to re-synchronise, but as the publication is
> rather big I was wondering if there was a better way of doing it.
> Thanks
> Peter