Switching the Controller Database v6.2

The controller database is designated in the xDB Replication Configuration file and determines the publication database to which the publication server and subscription server initially connect upon startup. See Controller Database for information on the controller database. See xDB Replication Configuration File for information on the xDB Replication Configuration file.

The current controller database cannot be removed from a replication system unless it is the last publication database remaining subordinate to the publication server. (That is, there are no other publication databases managed by the publication server.)

If there are more than one publication databases, and you wish to remove the publication database currently designated as the controller database, you must first set another publication database as the controller, and then you can remove the publication database previously designated as the controller.

The publication database used as the controller can be the primary database of any single-master replication system or any primary node of a multi-master replication system. Any database type (Oracle, SQL Server, or Postgres) is acceptable as the controller database.

Note

If the controller database is an Oracle or a SQL Server publication database, then a second Oracle or SQL Server publication database cannot be added to create a second single-master replication system. In order for xDB Replication Server to run more than one single-master replication systems consisting of Oracle or SQL Server publication databases, a Postgres publication database must be designated as the controller database.

Once you have multiple Oracle or SQL Server publication databases set up in single-master replication systems with a Postgres controller database, do not switch the controller database to an Oracle or SQL Server publication database.

Upon switching the controller database, the publication server updates the xDB Replication Configuration file so the parameters user, password, host, port, database, and type are set to the connection and authentication settings for the selected publication database.

The following are the steps to set another publication database as the controller database.

Step 1: Make sure the publication server whose node is the parent of the publication databases is running and has been registered in the xDB Replication Console you are using. See Registering a Publication Server for directions on starting and registering a publication server.

Step 2: Select the Publication Database node corresponding to the publication database that you wish to set as the controller database.

Selecting the publication database to set as the controller database

Figure 7-97: Selecting the publication database to set as the controller database

Step 3: Click the secondary mouse button on the Publication Database node and choose Set as Controller database.

Setting the controller database

Figure 7-98: Setting the controller database

Step 4: In the Set as Controller database confirmation box, click the Yes button.

Set as Controller database confirmation

Figure 7-99: Set as Controller database confirmation

Step 5: The selected publication database has now been set as the controller database.

Publication database promoted to controller database

Figure 7-100: Publication database promoted to controller database

Step 6: The value Yes in the Controller database field of the Property window indicates this database is the controller database.

Controller database indicated by Yes in the Property window

Figure 7-101: Controller database indicated by ‘Yes’ in the Property window

The following shows the xDB Replication Configuration file after the controller database has been switched to the primary node database MMRnode_b.

#xDB Replication Server Configuration Properties
#Thu Oct 15 14:42:35 GMT-05:00 2015
port=5444
admin_password=ygJ9AxoJEX854elcVIJPTw\=\=
user=MMRuser
admin_user=admin
type=enterprisedb
database=MMRnode_b
password=ygJ9AxoJEX854elcVIJPTw\=\=
host=192.168.2.22