restart transactional replication from cmd line | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

restart transactional replication from cmd line

hi, i set up transactional replication on sql server 2000. It works fine for example for a table. Now my destination db is refreshed everynight, and i want then the replication to be immediatly rebuilt (meaning a new snapshot) just after. the issue i have is that i don’t know how to do it from script , only selecting initializing again from the sql entreprise manager. If i don’t do this , my replication is still broken. Tks for your help
Check the SQLAgent job scheduling in this case to perform such updation. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
tks , i found how to do it : EXEC sp_reinitsubscription
@subscriber = ‘servername’,
@destination_db = ‘dbname’,
@publication = ‘publication name’;
]]>