Logical Components v6.2
This section discusses the logical components of a replication system, how they are related to each other, and how they correspond to the programs and databases in a replication system.
The logical components are created when you build a replication system using the xDB Replication Console or the xDB Replication Server CLI. The logical components are stored as part of the replication system metadata in the control schema of the publication databases.
Creating a replication system requires the following steps:
- Register a publication server
- Create a publication database definition
- Create a publication
For a single-master replication system, you then perform the following:
- Register a subscription server
- Create a subscription database definition
- Create a subscription
For a multi-master replication system, you create additional primary nodes by creating additional publication database definitions.
Each of these steps creates a logical component that is represented by a node in the replication tree of the xDB Replication Console. See Chapter Introduction to the xDB Replication Console for a description of the xDB Replication Console. A brief description of these components is given in the following sections.
Publication Server
The first step in creating a publication is to identify the publication server that is to be used to manage the publication. This process is called registering the publication server.
Using the xDB Replication Console or the xDB Replication Server CLI, a publication server is registered by giving the IP address and port number of the host on which the publication server is running, along with the admin user name and password stored in the xDB Replication Configuration file located on the host running the publication server. (This information is determined during the publication server installation process.)
When viewed in the xDB Replication Console, a registered publication server appears under the top level Replication Servers node in the replication tree. All publication related logical components are created subordinate to a registered publication server and appear underneath it in the replication tree.
Section Registering a Publication Server gives directions for registering a publication server for a single-master replication system. See Registering a Publication Server for a multi-master replication system.
Replication System Type (SMR/MMR)
Subordinate to a registered publication server, two nodes representing the replication system type appear. One is identified by the label SMR for single-master replication and the other has the label MMR for multi-master replication.
If you are creating a single-master replication system, you proceed to add logical components under the SMR type node.
If you are creating a multi-master replication system, you proceed to add logical components under the MMR type node.
Publication Database Definition
Subordinate to one of the Replication System Type nodes under a registered publication server, one or more publication database definitions can be created.
A publication database definition identifies a database whose tables and views are to be used in a publication. The identify information consists of the database server IP address, port number, a database user name and password, and the database identifier.
The publication server uses this information to connect to the publication database in order to create the replication system control schema in the publication database and perform the replications.
Though the process of creating a publication database definition is similar for single-master and multi-master replication systems, their usage within the replication system is somewhat different.
In a single-master replication system, a publication database definition identifies the storage area of one or more publications, each of which is eventually associated with its own subscription in a primary-to-secondary relationship.
In a multi-master replication system, each publication database definition subordinate to the MMR type node of a given publication server identifies a primary node in a single, multi-master replication system.
Note
Currently, there can only be one multi-master replication system per publication server.
Section Adding a Publication Database discusses creating a publication database definition for a single-master replication system. See Adding the Primary definition node and Creating Additional Primary nodes for a multi-master replication system.
Publication
Subordinate to a publication database definition in a single-master replication system, one or more publications can be defined. A publication contains a list of tables and views that are to be replicated to a subscription database.
In a single-master replication system, the database user name specified in the publication database definition of the publication’s parent, as viewed in the replication tree, must have the SELECT
object privilege on any table or view that is to be included in the publication.
Subordinate to a publication database definition in a multi-master replication system, one and only one publication can be defined. The publication contains the list of tables that are to be replicated and kept synchronized in the primary nodes of the multi-master replication system.
In a multi-master replication system, the database user name specified in the publication database definition of the publication’s parent, as viewed in the replication tree, must have superuser privileges and be the owner of all tables to be included in the publication.
Section Adding a Publication discusses creating a publication for a single-master replication system. See Adding a Publication for a multi-master replication system.
Subscription Server
Note
The subscription server applies only to single-master replication systems. You do not register a subscription server when creating a multi-master replication system.
The first step in creating a subscription is to identify the subscription server that is to be used to manage the subscription. This process is called registering the subscription server.
Using the xDB Replication Console or the xDB Replication Server CLI, a subscription server is registered by giving the IP address and port number of the host on which the subscription server is running, along with the admin user name and password stored in the xDB Replication Configuration file located on the host running the subscription server. (This information is determined during the subscription server installation process.)
When viewed in the xDB Replication Console, a registered subscription server appears under the top level Replication Servers node in the replication tree. All subscription related logical components are created subordinate to a registered subscription server and appear underneath it in the replication tree. Section Registering a Subscription Server gives directions for registering a subscription server.
Subscription Database Definition
Note
The subscription database definition applies only to single-master replication systems. You do not create a subscription database definition when creating a multi-master replication system.
Subordinate to a registered subscription server, one or more subscription database definitions can be created.
A subscription database definition identifies a database to which a publication’s tables and views are to be replicated. The identify information consists of the database server IP address, port number, a database user name and password, and the database identifier.
The subscription server uses this information to connect to the subscription database to create the table definitions.
The publication server also uses this information to connect to the subscription database when it performs replications.
Section Adding a Subscription Database discusses creating a subscription database definition.
Subscription
Note
The subscription applies only to single-master replication systems. You do not create a subscription when creating a multi-master replication system.
Subordinate to a subscription database definition, one or more subscriptions can be defined. A subscription associates a publication to a subscription database to which the publication’s tables and views are to be replicated.
Each subscription can be associated with one and only one publication.
Section Adding a Subscription discusses creating a subscription.