Skip to main content Skip to complementary content

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!