Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3a. BackupRestoreOracleEphemeralInternalPdb

These are the Internal user privileges:method privileges given to the user on the container.

Code Block
CREATE USER c##liquibase_ephemeral_sourceuser IDENTIFIED BY password;
GRANT CREATE SESSION TO c##liquibase_ephemeral_sourceuser CONTAINER=all;
GRANT CREATE PLUGGABLE DATABASE TO c##liquibase_ephemeral_sourceuser CONTAINER=all;
GRANT SYSOPER TO c##liquibase_ephemeral_sourceuser CONTAINER=all;

3b. BackupRestoreOracleEphemeralExternalPdb

External user privileges:

On the external database we will create a new user on oracle CDB with the following privileges. This allows us to create an ephemeral copy and create a link with the source database.

...

These are the external method privileges given to the users for both the source and external containers.

The source database is the first database in a pipeline. The external database will be an ephemeral copy of the source database made on the external container.

Source container user privileges:

Code Block
-- connect as SYSDBA to a Source DB to create common user 
CREATE USER c##liquibase_ephemeral_source IDENTIFIED BY password; 
GRANT CREATE SESSION TO c##liquibase_ephemeral_source CONTAINER=all; 
GRANT SYSOPER TO c##liquibase_ephemeral_source CONTAINER=all;

External container user privileges:

On the external

...

Info

The user name must start with c## to be a correct user type.

c##liquibase_ephemeral_user is just an example value, you can specify any name you would like. This is the user that connects to the ephemeral dbDef.

database we will create a new user on oracle CDB with the following privileges. This allows us to create an ephemeral copy and create a link to the source database.

Code Block
CREATE USER c##liquibase_ephemeral_external IDENTIFIED BY password;
GRANT CREATE SESSION TO c##liquibase_ephemeral_external CONTAINER=all;
GRANT CREATE PLUGGABLE DATABASE TO c##liquibase_ephemeral_external CONTAINER=all;
GRANT SYSOPER TO c##liquibase_ephemeral_external CONTAINER=all;
Info

The user name must start with c## to be a correct user type.

c##liquibase_ephemeral_user is just an example value, you can specify any name you would like. This is the user that connects to the ephemeral dbDef.

This is the database link on the external container to the source database.

Code Block
--- you need to know hostname, port and service name of DB2 database instance
--- you need to know credetials for database user which has enough priviliges 
---     to perform copy operation 
CREATE PUBLIC DATABASE LINK liquibase_db_link
    CONNECT TO c##liquibase_ephemeral_source IDENTIFIED BY password
    USING '(DESCRIPTION=
            (ADDRESS=(PROTOCOL=TCP)(HOST=172.18.0.2)(PORT=1521))
            (CONNECT_DATA=(SERVICE_NAME=ORCLCDB))
        )';

TNS option
Also there is a possibility to use TNS name during link creation, e.g.

Code Block
CREATE DATABASE LINK liquibase_db_link
 CONNECT TO c##liquibase_ephemeral_user_asource IDENTIFIED BY password
 USING TNS_NAME;

...

Code Block
SELECT * FROM dual@liquibase_db_link;
Info

If you would like to use another name for database link - please use oracleEphemeralDatabaseLinkName packager property.

4. Optional: Only for TNSNAMES/LDAP Users
Use TNSNAMES/LDAP with Oracle Ephemeral Database

...