Removing a Publication Database v6.2
Deleting a publication database definition from xDB Replication Server is equivalent to removing its Publication Database node.
If the Publication Database node to be removed is currently designated as the controller database, and there are additional publication databases in other single-master or multi-master replication systems, then you must first switch the controller database role to another publication database. See Switching the Controller Database for information on switching the controller database.
If the Publication Database node to be removed is the only remaining publication database (that is, there are no other single-master or multi-master replication systems), then this database can remain as the controller database since there is no other publication database available to be designated as the controller database. However, any existing subscription database definition must be removed before removing the last Publication Database node.
In a single-master replication system, before a Publication Database node can be removed, all publications under that Publication Database node must be removed. See Removing a Publication for directions on removing a publication.
In a multi-master replication system, removing a Publication Database node representing a primary node (other than the primary definition node), eliminates that node’s future participation in the replication system. Synchronization replications no longer involve tables in the removed primary node.
In a multi-master replication system, removing the Publication Database node representing the primary definition node removes the remaining metadata database objects of that particular multi-master replication system, effectively removing the multi-master replication system (except for the database objects comprising the publication tables).
Removing the Publication Database node representing the primary definition node entails the following steps:
- If the multi-master replication system is the only xDB replication system (that is, there are no single-master replication systems), then switch the controller database to the primary definition node if the designated controller database is not currently the same database as the primary definition node.
- If there are one or more single-master replication systems in addition to the multi-master replication system, switch the controller database to a Postgres publication database of a single-master replication system. If none of the single-master publication databases is of type Postgres, and there are more than one Oracle or SQL Server publication databases, then you must create a Postgres publication database for a single-master replication system just for the purpose of designating it as the controller database.
- All Publication Database nodes representing non-MDN nodes must be removed. Repeat the process described in this section for each such primary node.
- The publication under the Publication Database node representing the primary definition node must be removed. See Removing a Publication for directions on removing a publication.
- Remove the Publication Database node representing the primary definition node using the process described in this section.
Removing a Publication Database node does not delete the physical database from the database server. It removes the identity and association of the database to xDB Replication Server so no further replications can originate from tables in the database unless there are other publication database definitions in xDB Replication Server with the same host and database identifier. The physical database can only be removed using the database management system’s database removal procedures.
The publication database user name is also left intact.
All xDB Replication Server metadata database objects created for that publication database definition are deleted.
For Oracle and SQL Server: All metadata database objects under the publication database user’s schema are deleted.
For Postgres only: The schema _edb_replicator_pub
and all of its database objects are deleted from the publication database.
The following are the steps to remove the Publication Database node and equivalently, the publication database definition:
Step 1: Make sure the publication server whose node is the parent of the publication database definition you wish to remove 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 that you wish to remove.
Figure 7-94: Selecting a publication database definition for removal
Step 3: From the Publication menu, choose Publication Database, then Remove Database. Alternatively, click the secondary mouse button on the Publication Database node and choose Remove Database. The Remove Publication Database confirmation box appears.
Step 4: In the Remove Publication Database confirmation box, click the Yes button.
Figure 7-95: Remove Publication Database confirmation
The Publication Database node no longer appears under the Publication Server node.
Figure 7-96: Replication tree after removing a publication database