Replicação de Dados com Múltiplos processos de Extração e Replicação em Modo de Captura Integrada no Oracle GoldenGate 12c

Por Yenugula Venkata RaviKumar Oracle ACE e Alex Zaballa Oracle ACE Director
Postado em Abril 2016

Revisado por Marcelo Pivovar - Solution Architect

Introdução

O Oracle GoldenGate 12c permite que sejam configurados múltiplos processos Replicat em paralelo para aumentar a performance na aplicação dos dados no banco de destino. Configurar o Oracle GoldenGate Extract no modo de captura integrado, traz a vantagem da utilização do LogMiner server e a simplificação no gerenciamento.

Neste artigo você irá aprender a configurar o software do Oracle GoldenGate12c para executar DMLs e DDLs entre o banco de origem (Oracle Database 12c), com múltiplos processos Extract, múltiplos processos Replicat, múltiplos processos Pump e o banco de destino (Oracle Database 12c).

O banco “srcdb” (Oracle 12cR1) será o banco de dados de origem e o “tardb” (Oracle 12cR1) será o banco de dados de destino.


Banco de Origem (srcdb)


Banco de Destino (tardb)

  • Oracle 12c R1 Database (12.1.0.1.0)
  • Oracle GoldenGate 12c (12.1.2.1.0)
  • Oracle Enterprise Linux 5.8 (x86-64)
  • Database Name : srcdb
  • Schema Name : scott
  • Host Name : ggnode1
  • IP Address: 192.168.56.105
  • Oracle 12c R1 Database (12.1.0.1.0)
  • Oracle GoldenGate 12c (12.1.2.1.0.)
  • Oracle Enterprise Linux 5.8 (x86-64)
  • Database Name : tardb
  • Schema Name : scott
  • Hostname: ggnode2
  • IP Address: 192.168.56.106

 


Processos do OGG no banco de origem (srcdb)


Processos do OGG no banco de destino (tardb)

  • Manager: Listening port 15100
  • Extract Process-1: ES1a
  • Extract Process-2: ES1b
  • Extract Process-3: ES1c
  • Pump Process-1: PS1a
  • Pump Process-2: PS1b
  • Pump Process-3: PS1c
  • Manager: Listening port 15200
  • Replicat Process-1: RS1a
  • Replicat Process-2: RS1b
  • Replicat Process-3: RS1c

 

 

Passos a serem executados no banco de dados de origem (srcdb):

  • Instalação software do banco de dados 12c do Oracle R1 com o usuário “oracle” no seguinte diretório - ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1;
  • Instalação software do Oracle GoldenGate 12c com o usuário “oracle” no seguinte

diretório - GOLDENGATE_HOME=/u01/app/ogg/12g;

  • Criar os subdiretórios para Oracle GoldenGate 12c no banco de dados de origem (srcdb)
  • Criar e configurar múltiplos processos Extract e Pump para replicação bidirecional entre o Oracle Database 12c (srcdb) e o Oracle Database 12c (tardb)
  • Colocar o banco de dados em ARCHIVELOG mode
  • Habilitar o force logging mode
  • Habilitar o supplemental logging
  • Configurar o Streams pool size para o modo de captura integrada.

Passo 1: Logar com o usuário oracle no servidor do banco de dados de origem (srcdb) e instalar o software. Após isso, logar como ogguser e configurar os subdiretórios para o Oracle GoldenGate 12c.

[oracle@ggnode1 12g]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Aug  7 2014 10:21:34
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.

GGSCI (ggnode1.oracle.com) 1> create subdirs

Creating subdirectories under current directory /u01/app/ogg/12g
Parameter files                                  /u01/app/ogg/12g/dirprm: already exists
Report files                                     /u01/app/ogg/12g/dirrpt: created
Checkpoint files                               /u01/app/ogg/12g/dirchk: created
Process status files                          /u01/app/ogg/12g/dirpcs: created
SQL script files                                 /u01/app/ogg/12g/dirsql: created
Database definitions files                 /u01/app/ogg/12g/dirdef: created
Extract data files                              /u01/app/ogg/12g/dirdat: created
Temporary files                                /u01/app/ogg/12g/dirtmp: created
Credential store files                        /u01/app/ogg/12g/dircrd: created
Masterkey wallet files                      /u01/app/ogg/12g/dirwlt: created
Dump files                                       /u01/app/ogg/12g/dirdmp: created

 

Logar no banco de dados de origem (srcdb) como sysdba

[oracle@ggnode1 ~]$ source 12c.env
[oracle@ggnode1 ~]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.1.0 Production on Sat Jun 20 13:46:03 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect sys/oracle@srcdb as sysdba
Connected.

SQL> set lines 200 pages 1000
SQL> CREATE TABLESPACE GOLDENGATE DATAFILE '/u01/app/oracle/oradata/srcdb/goldengate01.dbf' SIZE 100M AUTOEXTEND ON;
Tablespace created.

SQL> CREATE USER ogguser IDENTIFIED BY oracle DEFAULT TABLESPACE GOLDENGATE TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
User created.

SQL> GRANT CONNECT TO ogguser;
Grant succeeded.

SQL> GRANT DBA TO ogguser;
Grant succeeded.

SQL> GRANT UNLIMITED TABLESPACE TO ogguser;
Grant succeeded.

SQL> GRANT SELECT ANY DICTIONARY TO ogguser;
Grant succeeded.

SQL> alter database force logging;
Database altered.

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.

SQL> ALTER SYSTEM SWITCH LOGFILE;
System altered.

SQL> SELECT SUPPLEMENTAL_LOG_DATA_MIN,LOG_MODE FROM V$DATABASE;

SUPPLEME         LOG_MODE
---------------  -----------------
YES             ARCHIVELOG

SQL> alter user scott identified by oracle account unlock;
User altered.

 

Quando utilizamos o Extract no modo de captura integrada, é necessário configurar a área de memória do Oracle chamada Streams Poolm, que faz parte da System Global Area (SGA).

SQL> show parameter streams

NAME                                  TYPE                VALUE
------------------------------------  -----------         ------------------------------
streams_pool_size                     big integer         0

SQL> alter system set streams_pool_size=256M scope=both;
System altered.

SQL> show parameter streams

NAME                                 TYPE                VALUE
------------------------------------ -----------         ------------------------------
streams_pool_size                    big integer         256M

SQL> connect scott/oracle@srcdb
Connected.
 

SQL> select tname from tab;

TNAME
------------------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE

 

Logar no Oracle GoldenGate 12c no banco de dados de origem (srcdb)

GGSCI (ggnode1.oracle.com) 2> dblogin userid ogguser, password oracle
Successfully logged into database.

Registre os processos Extract ES1a, ES1 e ES1c com trail files individuais. Crie múltiplos processos Pump PS1a, PS1b e PS1c para transformar os trail files para o banco de destino (tardb).

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 4> register extract es1a database
Extract ES1A successfully registered with database at SCN 4341495.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 5> add extract es1a, integrated tranlog, begin now
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 6> add exttrail ./dirdat/ya, extract es1a, megabytes 10
EXTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 7> register extract es1b database
Extract ES1B successfully registered with database at SCN 4360660.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 8> add extract es1b, integrated tranlog, begin now
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 9> add exttrail ./dirdat/yb, extract es1b, megabytes 10
EXTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 10> register extract es1c database
Extract ES1C successfully registered with database at SCN 4374333.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 11> add extract es1c, integrated tranlog, begin now
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 12> add exttrail ./dirdat/yc, extract es1c, megabytes 10
EXTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 13> add extract ps1a, exttrailsource ./dirdat/ya
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 14> add rmttrail ./dirdat/ya, extract ps1a, megabytes 10
RMTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 15> add extract ps1b, exttrailsource ./dirdat/yb
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 16> add rmttrail ./dirdat/yb, extract ps1b, megabytes 10
RMTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 17> add extract ps1c, exttrailsource ./dirdat/yc
EXTRACT added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 18> add rmttrail ./dirdat/yc extract ps1c, megabytes 10
RMTTRAIL added.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 19> edit param es1a
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 20> view param es1a

extract es1a
exttrail ./dirdat/ya
userid ogguser, password oracle
cachemgr cachesize 512M
ddl include all
ddloptions report
statoptions resetreportstats
tranlogoptions excludeuser ogguser
tranlogoptions integratedparams (max_sga_size 1024, parallelism 1)
table scott.dept;

 

Verifique se o Extract ES1A está configurado no modo de captura Integrado (o Log Read Checkpoint mostrará Oracle Integrated Redo Logs)

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 49> info extract es1a

EXTRACT    ES1A               Last Started 2015-06-21 22:51   Status RUNNING
Checkpoint Lag                00:00:01 (updated 00:00:05 ago)
Process ID                    23996
Log Read Checkpoint     Oracle Integrated Redo Logs
2015-06-22 11:06:55
SCN 0.5652891 (5652891)

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 50>
 

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 21> edit param es1b
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 22> view param es1b

extract es1b
exttrail ./dirdat/yb
userid ogguser, password oracle
cachemgr cachesize 512M
ddl include all
ddloptions report
statoptions resetreportstats
tranlogoptions excludeuser ogguser
tranlogoptions integratedparams (max_sga_size 1024, parallelism 1)
table scott.dept;

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 23> edit param es1c
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 24> view param es1c

extract es1c
exttrail ./dirdat/yc
userid ogguser, password oracle
cachemgr cachesize 512M
ddl include all
ddloptions report
statoptions resetreportstats
tranlogoptions excludeuser ogguser
tranlogoptions integratedparams (max_sga_size 1024, parallelism 1)
table scott.dept;

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 25> edit param ps1a
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 26> view param ps1a

extract ps1a
userid ogguser, password oracle
rmthost ggnode2, mgrport 15200, compress
rmttrail ./dirdat/ya
table scott.dept, filter (@range (1,3));

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 27> edit param ps1b
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 28> view param ps1b

extract ps1b
userid ogguser, password oracle
rmthost ggnode2, mgrport 15200, compress
rmttrail ./dirdat/yb
table scott.dept, filter (@range (2,3));

 
 

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 29> edit param ps1c
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 30> view param ps1c

extract ps1c
userid ogguser, password oracle
rmthost ggnode2, mgrport 15200, compress
rmttrail ./dirdat/yc
table scott.dept, filter (@range (3,3));

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 31> info all

Program             Status              Group            Lag at Chkpt        Time Since Chkpt

MANAGER             STOPPED
EXTRACT             STOPPED             ES1A             00:00:00               00:05:04
EXTRACT             STOPPED             ES1B             00:00:00               00:04:28
EXTRACT             STOPPED             ES1C             00:00:00               00:03:52
EXTRACT             STOPPED             PS1A             00:00:00               00:03:17
EXTRACT             STOPPED             PS1B             00:00:00               00:03:11
EXTRACT             STOPPED             PS1C             00:00:00               00:03:07

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 32> edit param mgr
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 33> view param mgr

PORT 15100
DYNAMICPORTLIST 15510-15520
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

 

O Oracle Golden Gate requer que os valores de colunas chaves sejam registradas no redo, para permitir que os registros atualizados ou deletados no banco de origem sejam encontrados no banco de destino.
Adicione o supplemental logging a nível de schema utilizando o comando do Oracle Golden Gate ADD SCHEMATRANDATA.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 34> add schematrandata scott
2015-06-21 22:25:22  INFO    OGG-01788  SCHEMATRANDATA has been added on schema scott.
2015-06-21 22:25:22  INFO    OGG-01976  SCHEMATRANDATA for scheduling columns has been added on schema scott.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 35> edit param ./GLOBALS
GGSCI (ggnode1.oracle.com as ogguser@srcdb) 36> view param ./GLOBALS

GGSCHEMA OGGUSER
ENABLEMONITORING
CHECKPOINTTABLE GGS_CHECKPOINT

 
 

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 39> info all

Program             Status              Group           Lag at Chkpt        Time Since Chkpt

MANAGER             STOPPED
EXTRACT             STOPPED             ES1A            00:00:00               00:14:26
EXTRACT             STOPPED             ES1B            00:00:00               00:13:50
EXTRACT             STOPPED             ES1C            00:00:00               00:13:14
EXTRACT             STOPPED             PS1A            00:00:00               00:12:39
EXTRACT             STOPPED             PS1B            00:00:00               00:12:34
EXTRACT             STOPPED             PS1C            00:00:00               00:12:29

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 38> start mgr
Manager started.

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 48> info mgr
Manager is running (IP port ggnode1.oracle.com.15100, Process ID 23542).

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 40> info all

Program             Status              Group           Lag at Chkpt        Time Since Chkpt

MANAGER             RUNNING
EXTRACT             STOPPED             ES1A            00:00:00               00:17:02
EXTRACT             STOPPED             ES1B            00:00:00               00:16:26
EXTRACT             STOPPED             ES1C            00:00:00               00:15:50
EXTRACT             STOPPED             PS1A            00:00:00               00:15:15
EXTRACT             STOPPED             PS1B            00:00:00               00:15:10
EXTRACT             STOPPED             PS1C            00:00:00               00:15:05

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 45> info exttrail ./dirdat/ya

Extract Trail:       ./dirdat/ya
Extract:             ES1A
Seqno:               8
RBA:                 8881941
File Size:           10M

Extract Trail:       ./dirdat/ya
Extract:             PS1A
Seqno:               2
RBA:                 6898892
File Size:           10M

 
 

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 46> info exttrail ./dirdat/yb

Extract Trail:       ./dirdat/yb
Extract:             ES1B
Seqno:               8
RBA:                 9172543
File Size:           10M

Extract Trail:       ./dirdat/yb
Extract:             PS1B
Seqno:               2
RBA:                 6978307
File Size:           10M

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 47> info exttrail ./dirdat/yc

Extract Trail:       ./dirdat/yc
Extract:             ES1C
Seqno:               8
RBA:                 5718157
File Size:           10M

Extract Trail:       ./dirdat/yc
Extract:             PS1C
Seqno:               2
RBA:                 7041522
File Size:           10M

GGSCI (ggnode1.oracle.com as ogguser@srcdb) 48>

 

Passos a serem executados no banco de dados de destino (tardb):

  • Instalação software do banco de dados 12c do Oracle R1 com o usuário “oracle” no seguinte diretório - ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1;
  • Instalação software do Oracle GoldenGate 12c com o usuário “oracle” no seguinte diretório - GOLDENGATE_HOME=/u01/app/ogg/12g;
  • Criar os subdiretórios para Oracle GoldenGate 12c no banco de dados de destino (tardb);
  • Criar e configurar múltiplos processos Replicat no banco de dados de destino (tardb);
  • Colocar o banco de dados em ARCHIVELOG mode;
  • Habilitar o force logging mode;
  • Habilitar o supplemental logging;
  • Configurar o Streams pool size.

Passo 2: Logar com o usuário oracle no servidor do banco de dados de destino (tardb) e instalar o software. Após isso, logar como ogguser e configurar os subdiretórios para o Oracle GoldenGate 12c.

[oracle@ggnode2 ~]$ source 12c.env
[oracle@ggnode2 ~]$ cd $GG
[oracle@ggnode2 12g]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Aug  7 2014 10:21:34
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.

 

GGSCI (ggnode2.oracle.com) 1> create subdirs

Creating subdirectories under current directory /u01/app/ogg/12g

Parameter files                                  /u01/app/ogg/12g/dirprm: already exists
Report files                                     /u01/app/ogg/12g/dirrpt: created
Checkpoint files                               /u01/app/ogg/12g/dirchk: created
Process status files                          /u01/app/ogg/12g/dirpcs: created
SQL script files                                 /u01/app/ogg/12g/dirsql: created
Database definitions files                 /u01/app/ogg/12g/dirdef: created
Extract data files                              /u01/app/ogg/12g/dirdat: created
Temporary files                                /u01/app/ogg/12g/dirtmp: created
Credential store files                        /u01/app/ogg/12g/dircrd: created
Masterkey wallet files                      /u01/app/ogg/12g/dirwlt: created
Dump files                                       /u01/app/ogg/12g/dirdmp: created

 

Logar no banco de dados de destino (tabdb) como sysdba

[oracle@ggnode2 ~]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.1.0 Production on Sat Jun 20 13:49:28 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect sys/oracle@tardb as sysdba
Connected.

SQL> CREATE TABLESPACE GOLDENGATE DATAFILE '/u01/app/oracle/oradata/tardb/goldengate01.dbf' SIZE 100M AUTOEXTEND ON;
Tablespace created.

SQL> CREATE USER ogguser IDENTIFIED BY oracle DEFAULT TABLESPACE GOLDENGATE TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
User created.

SQL> GRANT CONNECT TO ogguser;
Grant succeeded.

SQL> GRANT DBA TO ogguser;
Grant succeeded.

SQL> GRANT UNLIMITED TABLESPACE TO ogguser;
Grant succeeded.

SQL> GRANT SELECT ANY DICTIONARY TO ogguser;
Grant succeeded.

SQL> alter database force logging;
Database altered.

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.

SQL> ALTER SYSTEM SWITCH LOGFILE;
System altered.

SQL> SELECT SUPPLEMENTAL_LOG_DATA_MIN,LOG_MODE FROM V$DATABASE;

SUPPLEME         LOG_MODE
--------------        ------------
YES                        ARCHIVELOG

SQL> alter user scott identified by oracle account unlock;
User altered.

SQL> sho parameter streams

NAME                                 TYPE                    VALUE
------------------------------------ -----------             ------------------------------
streams_pool_size                    big integer             0

SQL> alter system set streams_pool_size=256M scope=both;
System altered.

SQL> sho parameter streams

NAME                                 TYPE                    VALUE
------------------------------------ -----------             ------------------------------
streams_pool_size                    big integer             256M

SQL> connect scott/oracle@tardb
Connected.

SQL> select tname from tab;

TNAME
--------------------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE


Logar no Oracle GoldenGate 12c no banco de dados de destino (srcdb)

[oracle@ggnode2 12g]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Aug  7 2014 10:21:34
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.

GGSCI (ggnode2.oracle.com) 2> dblogin userid ogguser, password oracle
Successfully logged into database.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 4> edit param ./GLOBALS
GGSCI (ggnode2.oracle.com as ogguser@tardb) 5> view param ./GLOBALS

GGSCHEMA OGGUSER
ENABLEMONITORING
CHECKPOINTTABLE GGS_CHECKPOINT

GGSCI (ggnode2.oracle.com as ogguser@tardb) 6> exit
[oracle@ggnode2 12g]$ ./ggsci

GGSCI (ggnode2.oracle.com) 1> dblogin userid ogguser, password oracle
Successfully logged into database.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 1> add checkpointtable
No checkpoint table specified. Using GLOBALS specification (GGS_CHECKPOINT)...
Successfully created checkpoint table GGS_CHECKPOINT.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 2> add replicat rs1a, exttrail ./dirdat/ya
REPLICAT added.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 3> add replicat rs1b, exttrail ./dirdat/yb
REPLICAT added.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 4> add replicat rs1c, exttrail ./dirdat/yc
REPLICAT added.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 5> edit param rs1a

 
 

GGSCI (ggnode2.oracle.com as ogguser@tardb) 6> view param rs1a

replicat rs1a
userid ogguser, password oracle
assumetargetdefs
ddloptions report
discardfile ./dirout/rs1a.dsc, purge
map scott.dept, target scott.dept, filter (@range (1,3));

GGSCI (ggnode2.oracle.com as ogguser@tardb) 47> info replicat rs1a

REPLICAT   RS1A               Last Started 2015-06-21 22:37   Status RUNNING
Checkpoint Lag                00:00:00 (updated 00:00:10 ago)
Process ID                          23194
Log Read Checkpoint     File ./dirdat/ya000002
2015-06-21 22:58:13.060948  RBA 6898892

GGSCI (ggnode2.oracle.com as ogguser@tardb) 7> edit param rs1b
GGSCI (ggnode2.oracle.com as ogguser@tardb) 8> view param rs1b

replicat rs1b
userid ogguser, password oracle
assumetargetdefs
ddloptions report
discardfile ./dirout/rs1b.dsc, purge
map scott.dept, target scott.dept, filter (@range (2,3));

GGSCI (ggnode2.oracle.com as ogguser@tardb) 11> edit param rs1c
GGSCI (ggnode2.oracle.com as ogguser@tardb) 12> view param rs1c

replicat rs1c
userid ogguser, password oracle
assumetargetdefs
ddloptions report
discardfile ./dirout/rs1c.dsc, purge
map scott.dept, target scott.dept, filter (@range (3,3));

GGSCI (ggnode2.oracle.com as ogguser@tardb) 13> edit param mgr
GGSCI (ggnode2.oracle.com as ogguser@tardb) 14> view param mgr

PORT 15200
DYNAMICPORTLIST 15510-15520
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

 
 

GGSCI (ggnode2.oracle.com as ogguser@tardb) 15> info all

Program             Status              Group            Lag at Chkpt        Time Since Chkpt

MANAGER             STOPPED
REPLICAT            STOPPED             RS1A             00:00:00               00:03:44
REPLICAT            STOPPED             RS1B             00:00:00               00:03:37
REPLICAT            STOPPED             RS1C             00:00:00               00:03:26

GGSCI (ggnode2.oracle.com as ogguser@tardb) 24> start mgr
Manager started.

GGSCI (ggnode2.oracle.com as ogguser@tardb) 46> info mgr
Manager is running (IP port ggnode2.oracle.com.15200, Process ID 23184).

GGSCI (ggnode2.oracle.com as ogguser@tardb) 25> info all
Program             Status              Group             Lag at Chkpt        Time Since Chkpt

MANAGER             RUNNING
REPLICAT            STOPPED             RS1A              00:00:00               00:08:45
REPLICAT            STOPPED             RS1B              00:00:00               00:08:38
REPLICAT            STOPPED             RS1C              00:00:00               00:08:27

GGSCI (ggnode2.oracle.com as ogguser@tardb) 26> start er *

Sending START request to MANAGER ...
REPLICAT RS1A starting

Sending START request to MANAGER ...
REPLICAT RS1B starting

Sending START request to MANAGER ...
REPLICAT RS1C starting

GGSCI (ggnode2.oracle.com as ogguser@tardb) 27> info all
Program             Status            Group              Lag at Chkpt        Time Since Chkpt
MANAGER             RUNNING
REPLICAT            RUNNING           RS1A               00:00:00               00:00:01
REPLICAT            RUNNING           RS1B               00:00:00               00:00:01
REPLICAT            RUNNING           RS1C               00:00:00               00:00:01


Logar no Oracle GoldenGate 12c no banco de dados de destino (srcdb) e utilizar o usuário scott para realizar transações na tabela dept.

SQL> select count(*) from dept;

COUNT(*)
----------
99913

SQL> declare
deptno        number(6);
dname         varchar2(14);
loc           varchar2(13);
begin
for i in 100000..500000 loop
insert into dept values (i,'ORACLE','REDWOOD');
commit;
end loop;
end;
/
PL/SQL procedure successfully completed.

SQL> select count(*) from dept;

COUNT(*)
----------
499914

 

Verificando a sincronização das operações do banco de dados de origem (srcdb) com banco de dados de destino (tardb)

Verificando a localização dos Trail files com os seus tamanhos no banco de origem (srcdb)

Verificando a localização dos Trail files com os seus tamanhos no banco de destino (tardb). Nós utilizamos a opção de compressão de Trail files no banco de destino.


Verificando as estatísticas dos múltiplos processos Extract no banco de dados de origem (srcdb)

Verificando as estatisticas do processo Extract ES1a

Verificando as estatisticas do processo Extract ES1b

Verificando as estatisticas do processo Extract ES1c


Verificando as estatísticas dos múltiplos processos Extract no banco de dados de destino (tardb)  


Verificando as estatísticas dos múltiplos processos Replicat no banco de dados de destino (tardb)


Resumo

Configurados múltiplos processos Replicat no banco de destino para melhorar a performance da aplicação das transações. Também foi configurado o Oracle Golden Gate Extract em modo integrado para se ter vantagem da utilização do LogMiner server e simplificação no gerenciamento.
A Oracle recomenda primeiro configurar um único processo Replicat e monitorar a aplicação e performance. A adição de mais processos Replicat só deve ser realizada quando o desempenho de um único Replicat causa uma latência inaceitável.

 


Yenugula Venkata Ravikumar é um DBA com mais de 15 anos de experiencia com Oracle e em ambientes de alta disponibilidade (RAC, Data Guard, dentre outros), tuning e desempenho, migrações, backup e recover, Oracle Exadata X2 e X3, é Expert em sistemas operacionais tais como como AIX, HP-UX e Linux. Já participou como conferencista de Oracle pela India, onde mora atualmente. Obteve o título de "Oracle Certified Master (OCM 10g)" em 2009.

Alex Zaballa, formado em Análise de Sistemas, é especialista em Banco de Dados Oracle com sólidos conhecimentos em Servidores de Aplicação e Sistemas Operacionais; trabalha com Oracle há 15 anos, é Oracle ACE Director, certificado OCM Database 11G/Cloud e conta com mais de 190 outras certificações em produtos da Oracle. Alex também é fundador do Grupo de Usuários Oracle de Angola (GUOA) e membro do time OraWorld.

Este artigo foi revisto pela equipe de produtos Oracle e está em conformidade com as normas e práticas para o uso de produtos Oracle.