Search code examples
sql-server-2012replicationtransactional-replication

Trigger replication update manually and not automatically in SQL Server 2012


I have set up an Transactional Replication in SQL Server 2012 and it works fine (update after some seconds) But is it possible to edit my replication to trigger only if i "push a button for" and not automatically?


Solution

  • When you setup Transactional Replication and create subscriptions you can synchronize subscriptions:

    • Continuously
    • On demand
    • On a schedule

    This is covered in Synchronize Data.

    It sounds like you have configured your subscription to either synchronize continuously or on a schedule.

    If you would like to synchronize your subscription on demand, i.e., by pushing a button, you can do this a couple of different ways which are covered in Synchronize a Push Subscription and Synchronize a Pull Subscription:

    1. Using SQL Server Management Studio
    2. Invoking the replication agent executable
    3. Using Replication Management Objects (RMO)

    Both of the links above provide descriptions and examples of each approach. The quickest way to synchronize on demand by pushing a button is via SQL Server Management Studio. Right-click your subscription you want to synchronize on demand and click View Synchronization Status. Then click Start.