Get the App
SLTechnology News&Howtos  ›  Database  › 

SQL Server Replication- Local publish and subscribe configuration

Shulou Source: shulou.com Published: 2022-06-01 13:33:32 10月04日 Update

This article describes configuring local publish subscriptions in a single instance. Replication is a set of technologies that replicate and distribute data and database objects from one database to another, and then synchronize between databases to maintain consistency. With replication, data can be assigned to different locations and to remote or mobile users through local and wide area networks, dial-up connections, wireless connections, and Internet.

1. Configure local distribution

Right-click Replication and click Configure Distribution...

Select the local instance as the Distributor

Set the snapshot path to the local directory

Set the distribution database name and the distribution database file path (default)

Click close when you are finished

two。 Configure local publishing

Right-click Local Publications

Select published database

Select the type of publication (according to the actual need). Select the transaction here.

Select tables, stored procedures, views, methods that need to be published

Tables without primary keys are not allowed to publish

If you need to filter the published data, click Add to write the filter criteria. There is no need to filter here.

Set the account number of snapshot agent and log reading agent, and click Security Settings...

The settings are as follows

Set the publication name

3. Create a local subscription

Right-click Local Subscriptions and click New Subscriptions

Select Publishing Source

All agents run on the server of the distribution library

Select a subscription database, or you can choose to create a new

As follows, select a database that has been built

To set up a connection account, click.

The settings are as follows

Run continuously uninterrupted synchronization is selected by default

The default option is to initialize the subscription immediately

4. Check

After the configuration is complete, the database is displayed as follows

View Replication Monitor

View historical synchronization history

At this point, the local publish subscription configuration is complete.

Tags: Data selection database subscription configuration agent synchronization name instance snapshot server path assignment service difference consistency consistency upper selection between transactions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information NVidia macOS vpn MariaDB