Enable MS SQL database replication

Adaxes supports a configuration where log records are stored in multiple Microsoft SQL Server databases replicating data with each other. To enable such a configuration, you need to create and configure an MS SQL database that will serve as Publisher for log database replication. Other databases replicating data with it need to be configured as Subscribers in the replication. To configure a set of MS SQL databases replicating data with each other for Adaxes logs:

  1. Enable logging to an external MS SQL database.

  2. Configure the database to be used as Publisher for merge replication:

    1. In Object Explorer of Microsoft SQL Management Studio, connect to the instance of the SQL Server Database Engine that hosts the database used by Adaxes service.

    2. Expand the instance.

    3. Expand the Replication folder.

    4. Right-click Local Publications and then click New Publication.

    5. Specify a Distributor if distribution was not configured on the server.

       Distributor settings
      • On the Select a Distributor page, select '' will act as its own Distributor; SQL Server will create a distribution database and log.

      • On the Specify a root snapshot folder page, specify a network folder.

    6. On the Publication Database page, select the MS SQL database that is used for logging.

    7. On the Publication Type page, select Merge replication.

    8. Click Next till you reach the Agent Security page.

    9. Click Specify Settings and select Run under SQL Server Agent service account.

    10. Click OK and then click Next.

    11. On the Wizard Actions page, select Create Publication.

    12. On the Complete the Wizard page, enter a name for the publication.

    13. Click Finish.

  3. Create MS SQL databases that will act as Subscribers.

    1. Create an SQL database on Microsoft SQL Server.

      • Launch Microsoft SQL Management Studio.

      • In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.

      • Right-click Databases, and then click New Database.

      • Enter a database name.

      • In the Database Owner field, click ....

      • Specify the Adaxes service account as the database owner.

      • Click OK.

    2. In Object Explorer, expand the Replication folder.

    3. Right-click Local Subscriptions, and then click New Subscriptions.

    4. On the Publication page, select the Publisher and the necessary Publication.

    5. On the Merge Agent Location page, select Run each agent at its Subscriber.

    6. On the Subscribers page, select the database that will be the subscriber to the publication.

    7. On the Merge Agent Security page, click ....

    8. Select Run under SQL Server Agent service account.

    9. Click OK and then Next.

    10. On the Synchronization Scheduler page, select Run continuously in the Agent Schedule column.

    11. On the Initialize Subscriptions page, make sure that the Initialize option is enabled for the Subscriber.

    12. In the Initialize When column, select Immediately.

    13. On the Subscription Type page, select Client in the Subscription Type column.

    14. Click Next and complete the configuration.