Modify GoldenGate Registration in Oracle 12c Multitenant Container Databases

Modify GoldenGate 12c Registration in a Multitenant Container Database

With Oracle GoldenGate 12c in a 12c Multitenant Database Environment the pluggable databases (PDBs) often change.  In order to modify the PDBs that are registered with the extract process use REGISTER EXTRACT command with the ADD CONTAINER or DROP CONTAINER option.

In order to alter the registration, you must be logged into the database with ggsci.  The GoldenGate administrator must have been granted the proper privileges with the dbms_goldengate_auth package with container permissions as follows:

exec dbms_goldengate_auth.grant_admin_privilege(‘c##ggadmin’,container=>’all’);

To remove a PDB registration from an Oracle database follow these steps:

  1. Stop the extract

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 19> STOP EXTRACT etest

  1. Drop the PDB from registration

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 20> REGISTER EXTRACT etest DATABASE DROP CONTAINER (pdb21a)

2016-08-20 10:41:58  INFO    OGG-08226  Extract ETEST successfully dropped containers from database.

  1. Start the extract

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 21> START EXTRACT etest

Note:  If the extract is running you will be given a warning and the command will fail.

In order to add a Pluggable Database to the registration user the ADD CONTAINER option following these steps:

  1. Stop the extract

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 23> STOP EXTRACT etest

  1. Add the PDB to registration

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 24> register extract etest DATABASE ADD CONTAINER (pdb21a1)

2016-08-20 10:50:48  INFO    OGG-08225  Extract ETEST successfully registered containers with database at SCN 12252408.

  1. Start the extract

GGSCI (gg21a as c##ggadmin@gg21adb/CDB$ROOT) 25> STOP EXTRACT etest

Using this process, you can add and drop pluggable databases from the extract as necessary.

Because of the way the GoldenGate replicat works with container databases it is currently unnecessary to register the Pluggable Database.