Skip to main content Skip to complementary content

Prerequisites for the XStream mode

Before you begin

Before configuring CDC using XStream mode in Talend Studio, the administrator of the Oracle database should do the following:
  1. Activate the archive log mode in Oracle XStream mode;

  2. Open all PDBs for a CDB in Oracle;

  3. Configure an XStream administrator.

Activate the archive log mode in Oracle XStream mode

Procedure

  1. Connect to the Oracle database as an administrative user and run the following statement to display its archiving information:
    archive log list;
  2. If the database is not operating in the archive log mode, run the following statements to activate the archive log mode:
    shutdown immediate;
                      startup mount;
                      alter database archivelog;
                      alter database open;

Open all PDBs for a CDB in Oracle

During XStream configuration, if the Oracle database is a container database (CDB), you need to ensure that all pluggable databases (PDBs) in the CDB are in open read/write mode.

Procedure

  • To view the open mode of PDBs, connect to the Oracle database as an administrative user and run the following statement.
    select con_id, dbid, guid, name, open_mode from v$pdbs;
  • To open PDBs, connect to the Oracle database as an administrative user and run the following statement.
    alter pluggable database all open;

Configure an XStream administrator

About this task

To configure an XStream administrator, connect to the Oracle database as an administrative user with the right to create users, grant privileges, and create tablespaces, and then proceed with the following steps.

Procedure

  1. Create a tablespace for the XStream administrator by running the following statement. Skip this step if you want to use an existing tablespace.
    CREATE TABLESPACE xstream_tbs DATAFILE '$ORACLE_HOME/dbs/xstream_tbs.dbf' SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  2. Create a new user to act as the XStream administrator by running the following statements. Skip this step to identify an existing user.
    CREATE USER username IDENTIFIED BY password
                         DEFAULT TABLESPACE xstream_tbs
                         QUOTA UNLIMITED ON xstream_tbs;
    Information noteNote:
    • If you are creating an XStream administrator in a CDB, the XStream administrator must be a common user. The name of a common user must begin with c## or C##, and you need to include the CONTAINER=ALL clause in the statement.

    • If you are creating an XStream administrator using the Oracle default tablespace, you need to remove the DEFAULT TABLESPACE and QUOTA UNLIMITED ON clauses in the statement.

  3. Grant privileges to the XStream administrator by running the following statements and procedures:
    GRANT DBA TO username;
                         GRANT CONNECT, CREATE TABLE TO username;
                         GRANT RESOURCE TO username;
                         GRANT CREATE TABLESPACE TO username;
                         GRANT UNLIMITED TABLESPACE TO username;
                         GRANT SELECT_CATALOG_ROLE TO username;
                         GRANT EXECUTE_CATALOG_ROLE TO username;
                         GRANT CREATE SEQUENCE TO username;
                         GRANT CREATE SESSION TO username;
                         GRANT CREATE ANY VIEW TO username;
                         GRANT CREATE ANY TABLE TO username;
                         GRANT SELECT ANY TABLE TO username;
                         GRANT COMMENT ANY TABLE TO username;
                         GRANT LOCK ANY TABLE TO username;
                         GRANT SELECT ANY DICTIONARY TO username;
                         GRANT EXECUTE ON SYS.DBMS_CDC_PUBLISH to username;
                         GRANT CREATE ANY TRIGGER TO username;
                         GRANT ALTER ANY TRIGGER TO username;
                         GRANT DROP ANY TRIGGER TO username;
    BEGIN
                         DBMS_XSTREAM_AUTH.GRANT_ADMIN_PRIVILEGE(
                         grantee => 'username',
                         privilege_type => 'CAPTURE',
                         grant_select_privileges => TRUE);
                         END;
                         /
    BEGIN
                         DBMS_XSTREAM_AUTH.GRANT_ADMIN_PRIVILEGE(
                         grantee => 'username',
                         privilege_type => 'APPLY',
                         grant_select_privileges => TRUE);
                         END;
                         /

Results

Note that if you are granting privileges to a common user, you need to include the CONTAINER=ALL clause in the above GRANT statements and procedures.

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!