Thursday, November 16, 2017

SQL - How to temporarily pause replication

https://cavemansblog.wordpress.com/2012/03/12/startstop-sql-server-replication-agent/



--STOP the Distribution Agent:
sp_MSstopdistribution_agent @publisher, @publisher_db, @publication, @subscriber, @subscriber_db
--START the Distribution Agent:
sp_MSstartdistribution_agent @publisher, @publisher_db, @publication, @subscriber, @subscriber_db</pre>



exec distribution.dbo.sp_MSstartdistribution_agent @publisher  = 'PUBLISHERSERVER',
@publisher_db   = 'PUBLISHERDB',
@publication    = 'TABLE_EMPLOYEE',
@subscriber     = 'SUBSCRIBERSERVER',
@subscriber_db  = 'WAREHOUSEDB'

1 comment:

  1. "Msg 21846, Level 16, State 1, Procedure sp_MSdistributionagentjobcontrol, Line 60 [Batch Start Line 4]
    No se encontró un trabajo del agente de distribución para la suscripción de inserción transaccional o de instantáneas especificada."

    Help!

    ReplyDelete