Tuesday, March 20, 2012

Reinitialize subscription thru DOS

Hey All,
Is there a way thru which I can reinitialize a subscription using a
batch/ script file. Or force the generation of a snapshot and force
apply the snapshot using a batch/ script file.
Thanks a lot for your help.
Jatin
*** Sent via Developersdex http://www.codecomments.com ***
Jatin,
you need to call the relevant sp_reinit... stored procedure (eg
sp_reinitsubscription), followed by running the snapshot and
distribution/merge agents (sp_start_job). You could have all these as a TSQL
batch file and use OSQL to run the batch file if you need to do it through
DOS (also the OSQL commands could be in a DOS batch file).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul...that is exactly what I ended up doing.
*** Sent via Developersdex http://www.codecomments.com ***

No comments:

Post a Comment