Oracle12c traditional database schema OGG

OGG12C Configuration

Environment configuration:

Install the database Oracle12c

Installation source OGG: oggs PORT: 7809

Installation target side OGG: oggt PORT: 7909

The source and target-side address: 127.0.0.1

 

Source database:

----- modify the source database configurations:

SQL> sqlplus / as sysdba;

SQL>archive log list;

SQL>shutdown immediate;      

SQL>startup mount;

SQL> alter database archivelog; // open archive mode

SQL>alter database open;

 

SQL> alter database force logging; // set a mandatory logging

SQL> alter database add supplemental log data; // add additional log

SQL> alter system switch logfile; // log switching the additional logs into effect

 

SQL> select log_mode,supplemental_log_data_min,force_logging from v$database;

 

LOG_MODE         SUPPLEMENTAL_LOG   FORCE_LOGGING

------------------------------------------------------------------------------

ARCHIVELOG         YES                         YES

   (This configuration better)

 

SQL> alter system set enable_goldengate_replication = true scope = both; (source only) // OGG bound to the above ORACLE

 

------ is extracted to create a source user

SQL> create user oggs identified by oggs;

// empowerment

SQL> grant dba to oggs;

SQL>conn oggs/oggs

// Create the source table

SQL> create table table1(id number(8), name varchar2(20));

        

Target-side database:

------ modify the target database configurations:

SQL> sqlplus / as sysdba;

SQL>archive log list;

SQL>shutdown immediate;      

SQL>startup mount;

SQL> alter database archivelog; // open archive mode

SQL>alter database open;

 

SQL> alter database force logging; // set a mandatory logging

SQL> alter database add supplemental log data; // add additional log

SQL> alter system switch logfile; // log switching the additional logs into effect

 

------ create a target end users

SQL> create user oggt identified by oggt;

SQL> grant dba to oggt;

// Create the target table

SQL>conn oggt/oggt;

SQL> create table table2 (id number(8), name varchar2(20));

 

Source OGG :

Oggs into the directory to start ggsci

(This test does not involve mgr configuration)

------- MANAGER process configuration

GGSCI (ogg1.localdomain) 4> edit params mgr

PORT 7809

DYNAMICPORTLIST 7840-7914

AUTOSTART ER *

AUTORESTART ER *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 60

PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 7

LAGREPORTHOURS 1

LAGINFOMINUTES 3

LAGCRITICALMINUTES 5

MANAGER process parameter configuration instructions:

PORT: Specifies the service listening port; the default port is 7809

DYNAMICPORTLIST: Dynamic Port: You can develop a maximum of 256 dynamic list of available ports, when the specified port is not available, the management process will select an available port from the list, Collector source and target segments, Replicat, GGSCI process communication also use these ports;

COMMENT: comment lines, can also be used - to replace;

AUTOSTART: to specify which processes to start automatically when you start the management process;

AUTORESTART: automatic restart parameter setting: This setting means that at every 3 minutes to try to restart the process of EXTRACT all, a total of 5 attempts;

PURGEOLDEXTRACTS: regular cleaning trail file settings: This setting indicates that at delete for more than three days of trail file.

LAGREPORT, LAGINFO, LAGCRITICAL: definition data delayed warning mechanism: This represents MGR is provided at every process EXTRACT check delays one hour, and took more than 30 minutes if the delay information is recorded as an error log, a delay of more than 45 minutes, put it as a warning written to the error log.

------- landed source user

GGSCI (localhost) 1> dblogin userid oggs password oggs

        

add trandata user.table

 

------ Add Extract process

GGSCI (localhost) 2> add extract ex1 integrated tranlog, begin now

 

GGSCI (localhost) 3> add exttrail ./dirdat/os extract ex1

 

GGSCI (localhost) 4> edit params ex1

// fill in the following text ex1.prm

EXTRACT ex1

extract ex1

dynamicresolution

userid oggs,password oggs

--setenv(ORACLE_SID=oracle)

exttrail ./dirdat/os

table oggs.table1;

 

 

------ Add Pump process

GGSCI (localhost) 5> add extract pu1 exttrailsource ./dirdat/os, begin now

 

GGSCI (localhost) 6> add rmttrail ./dirdat/ot extract pu1

 

GGSCI (localhost) 7> edit params pu1

// fill in the following text pu1.prm

extract pu1

RMTHOST 127.0.0.1, MGRPORT 7909

RMTTRAIL ./dirdat/ot

TABLE oggs.table2;

 

Target end OGG :

Oggt into the directory to start ggsci

------ connection target users

GGSCI (localhost) 1> dblogin userid oggt password oggt

        

add checkpointtable user.table

 

------ Add Replicat process

GGSCI (localhost) 2> add replicat re1 integrated exttrail ./dirdat/ot

 

GGSCI (localhost) 7> edit params re1

// fill in the following text re1.prm

Replicator re1

DBOPTIONS INTEGRATEDPARAMS(parallelism 6)

USERID oggt, PASSWORD oggt

ASSUMETARGETDEFS

MAP oggs.table1, target oggt.table2;

Guess you like

Origin www.cnblogs.com/smandar/p/12115057.html