Cookbook – Goldengate Integrated Extract on Pluggable Database

#Export ORACLE_SID of container DATABASE, – my Container DB is “cdb01”.

[oracle@greporalab]$ export ORACLE_SID=cdb01

[oracle@greporalab]$ sqlplus / as sysdba

#Change to CONTAINER’s ROOT session.

SQL> alter session set container=CDB$ROOT;

#Create user and ADD Roles.

SQL> create user c##ggate identified by your_passowrd container=all
SQL> grant connect to c##ggate container=all;
SQL> grant dba to c##ggate container=all;
SQL> grant unlimited tablespace to c##ggate container=all;
SQL> grant create session to c##ggate container=all;
SQL> grant alter session to c##ggate container=all;
SQL> grant select any dictionary to c##ggate container=all;
SQL> alter system set enable_goldengate_replication=true scope=both;
SQL> alter database add supplemental log data;
SQL> alter database force logging;

#Change to PLUGGABLE DB Session, my Pluggable db name is plugg01.

SQL> alter session set container=plugg01;
SQL> create tablespace GOLDENGATE datafile '+DGDATA/' size 100M autoextend on;
SQL> alter user c##ggate default tablespace GOLDENGATE;

#Create Integrated EXTRACT.

[oracle@greporalab]$ cd $GGATE_HOME

[oracle@greporalab gg12c]$./ggsci

GGSCI (greporalab) 1> add extract E_INT01 INTEGRATED TRANLOG, BEGIN NOW

EXTRACT (Integrated) added.

GGSCI (greporalab) 1> edit param E_INT01

EXTRACT E_INT01

userid C##ggate password you_password

CACHEMGR CACHESIZE 5GB

exttrail ./dirdat/a1, FORMAT RELEASE 12.1

SOURCECATALOG plugg01

TABLE OWNER.TABLE_NAME;
TABLE OWNER.TABLE_NAME_1;
TABLE OWNER.TABLE_NAME_2;

GGSCI (greporalab) 1> dblogin userid C##ggate password your_password
Successfully logged into database CDB$ROOT.

GGSCI (greporalab as C##ggate@cdb01/CDB$ROOT)) 1> REGISTER EXTRACT E_INT01 DATABASE CONTAINER (plugg01)
2017-10-20 19:35:20 INFO OGG-02003 Extract E_INT01 successfully registered with database at SCN 7338138479501.

GGSCI (greporalab as C##ggate@cdb01/CDB$ROOT)) 1> add extract P_INT01 exttrailsource ./dirdat/a1
EXTRACT added.

GGSCI (greporalab as C##ggate@cdb01/CDB$ROOT)) 1> edit param P_INT01

extract P_INT01

--connection to database--
userid C##ggate password your_password

CACHEMGR CACHESIZE 1GB

rmthost greporalab02, mgrport 9809
rmttrail ./dirdat/b1

-- Tabelas
SOURCECATALOG plugg01

TABLE *.*;

GGSCI (greporalab as C##ggate@cdb01/CDB$ROOT)) 1> add rmttrail ./dirdat/b1 extract P_INT01
RMTTRAIL added.

If you need help to configure Replicat Process, send a smoke signal.

Enjoy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s