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:
-
Configure the database to be used as Publisher for merge replication:
-
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.
-
Expand the instance.
-
Expand the Replication folder.
-
Right-click Local Publications and then click New Publication.
-
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.
-
-
On the Publication Database page, select the MS SQL database that is used for logging.
-
On the Publication Type page, select Merge replication.
-
Click Next till you reach the Agent Security page.
-
Click Specify Settings and select Run under SQL Server Agent service account.
-
Click OK and then click Next.
-
On the Wizard Actions page, select Create Publication.
-
On the Complete the Wizard page, enter a name for the publication.
-
Click Finish.
-
-
Create MS SQL databases that will act as Subscribers.
-
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.
-
-
In Object Explorer, expand the Replication folder.
-
Right-click Local Subscriptions, and then click New Subscriptions.
-
On the Publication page, select the Publisher and the necessary Publication.
-
On the Merge Agent Location page, select Run each agent at its Subscriber.
-
On the Subscribers page, select the database that will be the subscriber to the publication.
-
On the Merge Agent Security page, click ....
-
Select Run under SQL Server Agent service account.
-
Click OK and then Next.
-
On the Synchronization Scheduler page, select Run continuously in the Agent Schedule column.
-
On the Initialize Subscriptions page, make sure that the Initialize option is enabled for the Subscriber.
-
In the Initialize When column, select Immediately.
-
On the Subscription Type page, select Client in the Subscription Type column.
-
Click Next and complete the configuration.
-