Moving the Publisher role
In the Active Roles replication model, a replication group includes the Publisher and may include several Subscribers. The Publisher plays a special role in the replication group: it synchronizes data changes between Subscribers. In some scenarios, you may want to move the Publisher role to another SQL Server.
For example, you might need to move the Publisher role to a different SQL Server if the service level becomes insufficient. Given that the Publisher receives and synchronizes data changes from all Subscribers, the volume of requests being serviced by the Publisher increases as the number of Subscribers grows. Respectively increases the workload for SQL Server that holds the Publisher role so its performance can suffer. To resolve this problem, you can transfer the Publisher role to another, more powerful server.
This section provides instructions on how to reconfigure the existing replication group so that the Publisher role is assigned to SQL Server other than the current Publisher. You can perform this task using the Active Roles console connected to the Administration Service whose database server currently holds the Publisher role (Publisher Administration Service).
|
NOTE: The Publisher Administration Service must be up and running. If the Publisher is unavailable, you can move the Publisher role using the instructions outlined in the next section of this document. |
Open the Active Roles console and connect to the Publisher Administration Service:
- Look for the Active Roles Console application, and then click to start that application.
- Right-click the console tree root, click Connect, and then select the Administration Service whose database server currently holds the Publisher role.
Use the Active Roles console to remove all Subscribers and to demote the Publisher as follows:
- In the console tree, expand Configuration | Server Configuration, and select Configuration Databases.
- In the details pane, right-click a Subscriber, and click Delete.
- In the confirmation message box, click Yes.
- Repeat Steps 2–3 for each Subscriber.
- In the details pane, right-click the Publisher, and click Demote.
- In the confirmation message box, click Yes.
- Wait while Active Roles demotes the Publisher.
After these steps, you can promote the appropriate SQL Server to Publisher and designate the other SQL Servers as Subscribers to the new Publisher, thus configuring the new replication group.
|
TIP: After you add a Subscriber, the configuration data stored on the Publisher is replicated to the Subscriber, overriding the data on that Subscriber. Therefore, in order to retain your existing Active Roles configuration, it is advisable to assign the Publisher role to SQL Server that belonged to the old replication group. This ensures that each Administration Service in the new replication group inherits the configuration that was in place when you removed the Subscribers and demoted the Publisher. |
To configure the new replication group, perform the following steps using the Active Roles console:
- Right-click the console tree root, click Connect, and then select the Administration Service whose SQL Server you want to hold the Publisher role.
- In the console tree, expand Configuration | Server Configuration, and select the Configuration Databases container.
- In the details pane, right-click the database and click Promote.
- In the confirmation message box, click Yes.
- Wait while Active Roles performs the operation.
- In the details pane, right-click the Publisher, and click Add Replication Partner.
- On the Welcome page in the New Replication Partner wizard, click Next.
- On the Database Selection page, click Browse.
- In the Connect to Administration Service dialog box, select the Administration Service whose SQL Server is to be configured as a Subscriber to this Publisher. Click OK.
- In the New Replication Partner wizard, click Next, click Next, and then click Finish.
- Repeat Steps 6–10 for each SQL Server you want to make a Subscriber.
Recovering replication if Publisher is not available
Once the Publisher becomes unavailable, Subscribers cannot synchronize configuration data. The only way that replication can be recovered is by restoring the current Publisher or making another SQL Server the Publisher.
If the current Publisher cannot be restored, you need to transfer the Publisher role to SQL Server that holds the Subscriber role, and reconfigure the other Subscribers to use the new Publisher. This requires that you first remove all Subscribers from the replication group.
Given that the Publisher is unavailable, you can remove a Subscriber from the replication group by using the Active Roles console as follows:
- Right-click the console tree root, click Connect, and then select the Administration Service that uses the Subscriber SQL Server.
- In the console tree, expand Configuration | Server Configuration, and select Configuration Databases.
- In the details pane, right-click the Subscriber and select All Tasks | Advanced Properties.
- In the Advanced Properties window, select both the Show all possible attributes and Include attributes with empty values check boxes.
- In the list of attributes, double-click the attribute edsvaReplicationForceStandalone.
- In the Edit Attribute window, type TRUE in the Value box. Click OK.
- In the Advanced Properties window, click OK.
Once you have removed all Subscribers from the replication group, you can promote one of the former Subscribers to Publisher and add Subscribers to the new Publisher by using the Active Roles console as follows:
- Right-click the console tree root, click Connect, and then select the Administration Service whose SQL Server you want to hold the Publisher role.
|
TIP: After you add a Subscriber, the configuration data stored on the Publisher will be replicated to the Subscriber, overriding the data on that Subscriber. Therefore, in order to retain your existing Active Roles configuration, assign the Publisher role to one of the former Subscribers. This ensures that each Administration Service in the new replication group inherits the configuration that was in place when you removed the Subscribers from the replication group. |
- In the console tree, expand Configuration | Server Configuration, and select Configuration Databases.
- In the details pane, right-click the database and click Promote.
- In the confirmation message box, click Yes.
- Wait while Active Roles performs the operation.
- In the details pane, right-click the Publisher, and click Add Replication Partner.
- On the Welcome page in the New Replication Partner wizard, click Next.
- On the Database Selection page, click Browse.
- Use the Connect to Administration Service dialog box to specify the Administration Service whose SQL Server is to be configured as a Subscriber to this Publisher. Click OK.
- In the New Replication Partner wizard, click Next, click Next, and then click Finish.
- Repeat Steps 6–10 for each SQL Server you want to make a Subscriber.
Troubleshooting
Troubleshooting Replication failures
If there are any replication failures in Active Roles, the Active Roles Console provides a visual indication of this issue by placing a red triangle on the Server Configuration and Configuration Databases containers in the console tree. To get more information on a replication failure, you can use SQL Server Management Studio (see Monitoring replication).
The following sections discuss specific actions to take if you encounter a replication problem in Active Roles.
Replication Agent malfunction
Symptoms
Replication stops synchronizing changes to configuration data, that is, changes made on a replication partner are not propagated to other replication partners. Replication Monitor in SQL Server Enterprise Manager or SQL Server Management Studio does not indicate any error.