anchor.diff:     );
   END;
   /
  +
  +exit;
  +----
  +
  +Create XStream user (used by the Debezium connector to connect to the XStream outbound server):
  +
  +[source,indent=0]
  +----
  +sqlplus sys/top_secret@//localhost:1521/ORCLCDB as sysdba
  +CREATE TABLESPACE xstream_tbs DATAFILE '/opt/oracle/oradata/ORCLCDB/xstream_tbs.dbf'
  +  SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  +exit;
  +----
  +
  +[source,indent=0]
  +----
  +sqlplus sys/top_secret@//localhost:1521/ORCLPDB1 as sysdba
  +CREATE TABLESPACE xstream_tbs DATAFILE '/opt/oracle/oradata/ORCLCDB/ORCLPDB1/xstream_tbs.dbf'
  +  SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  +exit;
  +----
  +
  +[source,indent=0]
  +----
  +sqlplus sys/top_secret@//localhost:1521/ORCLCDB as sysdba
  +
  +CREATE USER c##xstrm IDENTIFIED BY xs
  +  DEFAULT TABLESPACE xstream_tbs
  +  QUOTA UNLIMITED ON xstream_tbs
  +  CONTAINER=ALL;
  +
  +GRANT CREATE SESSION TO c##xstrm CONTAINER=ALL;
  +GRANT SET CONTAINER TO c##xstrm CONTAINER=ALL;
  +GRANT SELECT ON V_$DATABASE to c##xstrm CONTAINER=ALL;
  +GRANT FLASHBACK ANY TABLE TO c##xstrm CONTAINER=ALL;
   
   exit;
   ----
  
positive.code: exit;
  ----
  
  === Setting up a User
  
  Create a database user to be used by the connector
  (this should require less database privileges going forward, https://issues.jboss.org/browse/DBZ-754[DBZ-754]):
  
  [source,indent=0]
  ----
  sqlplus sys/top_secret@//localhost:1521/ORCLCDB as sysdba
  CREATE TABLESPACE xstream_tbs DATAFILE '/opt/oracle/oradata/ORCLCDB/xstream_tbs.dbf'
    SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
  
  sqlplus sys/top_secret@//localhost:1521/ORCLPDB1 as sysdba
  CREATE TABLESPACE xstream_tbs DATAFILE '/opt/oracle/oradata/ORCLCDB/ORCLPDB1/xstream_tbs.dbf'
    SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  exit;
  
  sqlplus sys/top_secret@//localhost:1521/ORCLCDB as sysdba
  
  CREATE USER c##xstrmadmin IDENTIFIED BY xsa
    DEFAULT TABLESPACE xstream_tbs
    QUOTA UNLIMITED ON xstream_tbs
    CONTAINER=ALL;
  
  GRANT CREATE SESSION, SET CONTAINER TO c##xstrmadmin CONTAINER=ALL;
  GRANT DBA TO c##xstrmadmin;
  
  BEGIN
     DBMS_XSTREAM_AUTH.GRANT_ADMIN_PRIVILEGE(
  
negative.code:     server_name     =>  'dbzxout',
      table_names     =>  tables,
      schema_names    =>  schemas);
  END;
  /
  
  exit;
  ----
  
  Alter the XStream Outbound server to allow the xstrm user to connect to it:
  
  [source,indent=0]
  ----
  sqlplus sys/top_secret@//localhost:1521/ORCLCDB as sysdba
  
  BEGIN
    DBMS_XSTREAM_ADM.ALTER_OUTBOUND(
      server_name  => 'dbzxout',
      connect_user => 'c##xstrm');
  END;
  /
  
  