Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Oracle-12c Configure Step by Step Goldengate Unidirectional Method

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Oracle-12c Configure Step by step

Goldengate Unidirectional Method


Oracle-12c Configure Step by step Goldengate Unidirectional
Method
Description:-
In oracle goldengate unidirectional configuration allows data workflow in
one direction, from source to target only. Source system goldengate extract
group capture the changes information from either redo log files or
archivelog and forward Oracle goldenGate trails to the remote system. And
replication group apply the transactions to the target database keeping the
two databases synchronized.

Replication between two databases requires the setting up of the Manager,


Extract and Pump processes on the source database and setting up the
Manager and Replicat processes on the target database.

MANAGER: Runs on all servers involved in the replication. It is the master


process which controls all GG activity.
EXTRACT: Runs on the source database server. It extracts data from the
Oracle database either directly or indirectly in the case of Integrated
capture.
DATAPUMP: Runs on the source database server. It is an optional process
which transmits extracted data from the source database server to the
target database server. (Optional because the EXTRACT process can do
this directly).
SERVER COLLECTOR: Runs on the target database server. Receives
extracted data from source database server and stages it in the local trail
files on the target database server for the REPLICAT process to apply it to
the target database.
REPLICAT: Runs on the target database server. Reads extracted data
from the local trail file on the target database server and applies the data to
the target database.

Installing Oracle 12.2 GoldenGate on Linux server Here


Oracle-12c Configure Step By Step Goldengate Bidirectional Method Here
Source Database
Hostname : ggsource.doyensys.com

Oracle database SID: GGSOURCE

Oracle version: 12.2.0

Oracle GG version: 12.2.0

Target Database
Hostname : ggtarget.doyensys.com

Oracle database SID: GGTARGET

Oracle version: 12.2.0

Oracle GG version: 12.2.0


Check the connectivity from source to target for replication.
Both source and target side add the host information to /etc/hosts file.

On source(ggsource.doyensys.com) verify that LOG_MODE is set


to ARCHIVELOG.
Archivelog must be enable on source side because if we are using classic
capture the extract process will capture the changes information through
archivelogs only, So it is mandatory for classic capture replication.

select LOG_MODE from v$database;


shu immediate;
startup mount;
ALTER DATABASE ARCHIVELOG;
alter database open;
select LOG_MODE from v$database;
Verify that supplemental logging and forced logging are set properly.
ALTER DATABASE FORCE LOGGING;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
select SUPPLEMENTAL_LOG_DATA_MIN,FORCE_LOGGING from
v$database;
This parameter must be changed on source and target databases:
ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION=TRUE
SCOPE=BOTH;
show parameter ENABLE_GOLDENGATE_REPLICATION

Create the administrator and user/schema owners on both source and


target database.
create user gguser identified by gguser default tablespace goldengate
quota unlimited on goldengate;

grant create session,connect,resource,alter system to gguser;


EXEC
DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE(grantee=>’gg
user’, privilege_type=>’CAPTURE’, grant_optional_privileges=>’*’);

Go to Golden Gate Installed location (in our scenario /u01/gghome)


and then run the following Golden Gate inbuild scripts for creating all
necessary objects to support DDL replication.
1. @marker_setup
2. @ddl_setup
3. @role_setup.sql
4. GRANT GGS_GGSUSER_ROLE TO <loggedUser>
5. @ddl_enable.sql
Start GGSCI and login into database using dblogin command.
dblogin userid gguser, password gguser

By default manager parameter has created while installing the


goldengate software we just add the user information to manager
parameter file.
PORT 7811

USERIDALAIS gguser

Check the manager parameter and status.


view param mgr

Source side add trandata for particular table which we wants to


replicate the data to target database.
add tranadata demo.*

Create the primary Extract parameter file.


EXTRACT ext1
USERID gguser@ggsource, PASSWORD gguser
EXTTRAIL /u01/gghome/dirdat/aa
DDL INCLUDE ALL
TABLE demo.*;
Create the Extract group and the local Extract trail file and start the
extract process.
add extract ext1 tranlog begin now

add exttrail /u01/gghome/dirdat/aa extract ext1

start extract ext1

Check the status of primary extract process.


info ext1

Create the secondary Extract (data pump) parameter file.


EXTRACT dpump1
USERID gguser@ggsource, PASSWORD gguser
RMTHOST ggtarget, MGRPORT 7810
RMTTRAIL /u01/gghome/dirdat/ab
DDL INCLUDE ALL
TABLE demo.*;

Create the data pump group and the remote Extract trail file and start
the data pump process.
add extract dpump1 exttrailsource /u01/gghome/dirdat/aa

add rmttrail /u01/gghome/dirdat/ab extract dpump1

start extract dpump1

To check the status of data pump process.


info dpump1
TARGET (GGTARGET.DOYENSYS.COM):
Start GGSCI and login into database using dblogin command.
./ggsci

dblogin userid gguser password gguser

To check the manager status on target server.


view param mgr

info mgr

To create a checkpoint Table in the target database.


add checkpointtable gguser.chkpt
info checkpointtable gguser.chkpt

Create the Replicat parameter file.


REPLICAT rep1
USERID gguser@ggtarget, PASSWORD gguser
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE
MAP demo.*, TARGET demo.*;

Create and start the replicat process.


add replicat rep1 exttrail /u01/gghome/dirdat/ab checkpointtable
gguser.chkpt

start replicat rep1

To check the status of replicat process.


info rep1

To check the replication from source to target database.


Create one sample table and generate insert operation into that table.

Verify that the table and rows were replicated into the target database.

You might also like