5.3 Creating a Subscription

Table of Contents Previous Next


5 Single-Master Replication Operation : 5.3 Creating a Subscription

Step 1: Start the subscription server if it is not already running. Repeat the same process as in Step 1 of Section 5.2.1.
Note: If you are using Oracle publication or subscription databases, and the subscription server has not been restarted since copying the Oracle JDBC driver to the lib/jdbc subdirectory of your xDB Replication Server installation, you must restart the subscription server.
For Linux only: Use the systemctl command for CentOS 7 or RHEL 7, and the service command for previous Linux versions to start, stop, or restart edb-xdbsubserver for the subscription server. See Section 5.2.1 for information on how these commands are used.
For Windows only: Open Control Panel, System and Security, Administrative Tools, and then Services. Use the Start or Restart link for the service named Subscription Service for xDB Replication Server.
Step 2: Register the subscription server. Open the xDB Replication Console from the system’s application menu. For xDB Replication Server installed from an xDB RPM package, the xDB Replication Console is started by invoking the script XDB_HOME/bin/runRepConsole.sh.
Step 3: Select the top level Replication Servers node. From the File menu, choose Subscription Server, and then choose Register Server. Alternatively, click the secondary mouse button on the Replication Servers node and choose Register Subscription Server. The Register Subscription Server dialog box appears.
Host. Network IP address of the host running the subscription server. This is the network IP address used for sub_ipaddr in the pg_hba.conf file in Section 5.1.6.3. (Do not use localhost for this field.)
Port. Port number the subscription server is using. This is the port number you specified on the Subscription Server Details screen in Step 17 of Section 3.1.
User Name. Admin user name that is used to authenticate your usage of this subscription server. This is the user name you specified on the xDB Admin User Details screen in Step 15 of Section 3.1.
Password. Password of the admin user given in the User Name field.
Save login information. Check this box if you do not want to re-register the subscription server each time you open the xDB Replication Console. See Section 4.2 for additional information on the advantages and disadvantages of saving server login information.
Note: The user name and password combination you enter is authenticated against the admin user name and password in the xDB Replication Configuration file residing on the host with the IP address you enter in the Host field.
For Oracle only. There must be no existing tables or views owned by the Oracle subscription database user that has the same name as a table or view in a publication that will be replicated to this database. For example, if the Oracle subscription database user name is subuser, and if a Postgres publication contains a table with the name dept, then the Oracle subscription database must not have an existing table or view with the schema-qualified name subuser.dept at the time you create the subscription.
For Postgres only. There must be no existing tables or views with the same schema-qualified name as a table or view in a publication that will be replicated to this database. For example, if the publication contains a table with the schema-qualified name edb.dept, then the Postgres subscription database must not have an existing table or view with the schema-qualified name edb.dept at the time you create the subscription. Note: If the SQL Server publication schema name is dbo, the subscription tables are created under a schema named dbo_sql in Postgres.
For SQL Server only. There must be no existing tables or views with the same schema-qualified name as a table or view in a publication that will be replicated to this database. For example, if the publication contains a table with the schema-qualified name edb.dept, then the SQL Server subscription database must not have an existing table or view with the schema-qualified name edb.dept at the time you create the subscription. Note: If the Postgres publication schema name is public, the subscription tables are created under a schema named public_sql in SQL Server.
Note: A database that has been added as a publication database can also be used as a subscription database.
Step 1: Make sure the database server in which the subscription database resides is running and accepting client connections.
Step 2: Select the Subscription Server node. From the Subscription menu, choose Subscription Database, and then choose Add Database. Alternatively, click the secondary mouse button on the Subscription Server node and choose Add Database. The Subscription Service – Add Database dialog box appears.
Step 3: Fill in the following fields:
Database Type. Select Oracle, SQL Server, PostgreSQL, or Postgres Plus Advanced Server for the type of subscription database. For an Advanced Server Oracle compatible installation, select the Postgres Plus Advanced Server option. For PostgreSQL or an Advanced Server PostgreSQL compatible installation, select the PostgreSQL option.
Host. IP address of the host on which the subscription database server is running.
Port. Port on which the subscription database server is listening for connections.
User. The subscription database user name chosen in Section 5.1.5.1 for a Postgres subscription database or the database user name created in Step 2 of Section 5.1.5.2 for an Oracle subscription database or the database user name created in Step 2 of Section 5.1.5.3 for a SQL Server subscription database.
Password. Password of the database user.
Service ID (For Oracle). Enter the Oracle System Identifier (SID) of the Oracle instance running the subscription database if the SID radio button is selected. Enter the net service name of a connect descriptor as defined in the TNSNAMES.ORA file if the Service Name radio button is selected. Note (For Oracle 12c Pluggable Database): Use the service name.
Database (For Postgres or SQL Server). Enter the Postgres or SQL Server database name.
URL Options (For SSL connectivity). Enter the URL options to establish SSL connectivity to the subscription database. See Section 7.11 for information on using SSL connections.
Step 4: Click the Test button. If Test Result: Success appears, click the OK button, then click the Save button.
Step 1: Select the Subscription Database node. From the Subscription menu, choose Create Subscription. Alternatively, click the secondary mouse button on the Subscription Database node and choose Create Subscription. The Create Subscription dialog box appears.
Step 2: Fill in the following fields:
Subscription Name. Enter a name for the subscription that is unique amongst all subscription names.
Host. Network IP address of the publication server that is the parent node of the publication to be subscribed to. This is the same value entered in the Host field in Step 3 of Section 5.2.1.
Port. Port used by the publication server. This is the same value entered in the Port field in Step 3 of Section 5.2.1.
User Name. Admin user name of the publication server. This is the same value entered in the User Name field in Step 3 of Section 5.2.1.
Password. Password of the admin user. This is the same value entered in the Password field in Step 3 of Section 5.2.1.
Publication Name. Click the Load button to get a list of available publications. Select the publication to which to subscribe.
Step 3 (Optional): If you defined a set of available table filters for the publication, you have the option of enabling these filters on this subscription. See Section 5.2.3 for instructions on defining table filters. If you do not wish to filter the rows that are replicated to this subscription, go to Step 4.
In the following example the filter named dept_10_20_30 is enabled on the dept table and the filter named dept_30 is enabled on the emp table of this subscription.
Step 4: Click the Create button. If Subscription Created Successfully appears, click the OK button, otherwise investigate the error and make the necessary corrections.
After you have added a subscription database definition you will find a single table named rrep_txset_health has been created as the subscription metadata object.
For Oracle only: The RREP_TXSET_HEALTH table is created in the subscription database user’s schema as shown in the following output:
For SQL Server only: The rrep_txset_health table is created in the schema named _edb_replicator_sub.
For Postgres only: The rrep_txset_health table is created in the schema named _edb_replicator_sub.

5 Single-Master Replication Operation : 5.3 Creating a Subscription

Table of Contents Previous Next