Skip to main content Skip to complementary content

Configuring CDC using XStream mode

This section provides detailed information about configuring the XStream Out and XStream In in Talend Studio.

Configuring XStream Out in Talend Studio

Procedure

  1. In the Repository tree view, set up a database connection using OCI connection type to an Oracle database, and then retrieve the schema of the source table in which data changes are to be captured. In this example, the source table is PERSON. For detailed information about how to set up a database connection and retrieve table schemas, see Centralizing database metadata.
    Example of the 'PERSON' table schema.
  2. Right-click CDC Foundation under the newly created Oracle database connection and select Create CDC from the contextual menu. The Create Change Data Capture dialog box opens up.
  3. Select XStream mode and click Show sample initialization script. The Sample Initialization Script dialog box opens up.
    Overview of the Sample Initialization Script dialog box.
    Note that this is only a sample script for configuring XStream on an Oracle 12c server, you need to update the username, password, and tablespace information according to your settings and run the statements and procedures in Oracle. For detailed information, see Prerequisites for the XStream mode.
    Click OK to close the Sample Initialization Script dialog box.
    Click Finish to create CDC in Oracle and close the Create Change Data Capture dialog box.
  4. Right-click the source table and select add CDC from the contextual menu.
    Contextual menu of a source table.
  5. Right-click the source table and select Generate XStreamsOut Script from the contextual menu. The XStreamsOut generation script dialog box opens up.
  6. Fill in the XStreams server name field with the outbound server name. The name must be a unique one.
  7. Identify the source tables by selecting the check boxes in the corresponding Include in script column.
    Configuration in the XStreamsOut generation script dialog box.
  8. Click Generate Script. The XStreamsOut Script dialog box pops up.
  9. Click Execute to create the XStream outbound server in Oracle.
    Note that if the script execution fails, you can connect to the Oracle database as an XStream administrator and run the script in Oracle.
  10. Connect to the Oracle database as an XStream administrator and check the status of the outbound server by running the following statement:
    select apply_name, status from dba_apply;
    If you need to remove an outbound server, run the following statements:
    exec DBMS_XSTREAM_ADM.DROP_OUTBOUND('xout'); 
                         exec DBMS_XSTREAM_ADM.REMOVE_XSTREAM_CONFIGURATION(container => 'ALL');

Configuring XStream In in Talend Studio

Procedure

  1. In the Repository tree view, set up a database connection using OCI connection type to an Oracle database, and then retrieve the schema of the target table to which data changes will be replicated. In this example, the target table is PERSON_BAK. For detailed information about how to set up a database connection and retrieve table schemas, see Centralizing database metadata.
    Example of the 'PERSON_BAK' table schema.
  2. Right-click CDC Foundation under the newly created Oracle database connection and select Create CDC from the contextual menu. The Create Change Data Capture dialog box opens up.
  3. Select XStream mode in the Options area and click Show sample initialization script. The Sample Initialization Script dialog box opens up.
    Overview of the Sample Initialization Script dialog box.
    Note that this is only a sample script for configuring XStream on an Oracle 12c server, you need to update the username, password, and tablespace information according to your settings and run the statements and procedures in Oracle. For detailed information, see Prerequisites for the XStream mode.
    Click OK to close the Sample Initialization Script dialog box.
    Click Finish to create CDC and close the Create Change Data Capture dialog box.
  4. Right-click the target table and select add CDC from the contextual menu.
    Contextual menu of a source table.
  5. Right-click the target table and select Generate XStreamsIn Script from the contextual menu. The XStreamsIn generation script dialog box opens up.
  6. Fill in the XStreams server name field with the inbound server name.
  7. Fill in the Queue name field with the name of the inbound server's queue.
  8. Click Generate script. The XStream In script will be generated and displayed.
  9. Click Execute to create the XStream inbound server in Oracle.
    Note that if the script execution fails, you can connect to the Oracle database as an XStream administrator and run the script in Oracle.
  10. Connect to the Oracle database as an XStream administrator and check the status of the inbound server by running the following statement:
    select apply_name, status from dba_apply;
    If the inbound server is disabled, start it by running the following statement:
    exec DBMS_APPLY_ADM.START_APPLY('xin');
    If you need to remove an inbound server, run the following statements:
    exec DBMS_XSTREAM_ADM.DROP_INBOUND('xin');
                         exec DBMS_XSTREAM_ADM.REMOVE_QUEUE('xin_queue'); 
                         exec DBMS_APPLY_ADM.DELETE_ALL_ERRORS(apply_name => 'xin');

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!