This is an old revision of the document!
Configuration of the source
Clean the environment
First assure that you don't have any running jobs:
/u01/app/oracle/product/12.1.2/DBNAME_gg/ggsci GGSCI (sourceSRV.izb.local as ggate@DBNAME) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING <- Except this one, this one is by default there (Boring)
If any jobs are present, STOP them, DELETE them and Clean them.
GGSCI (sourceSRV.izb.local) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING EBKDMP1 00:00:00 00:00:08 EXTRACT RUNNING EBKEXT1 00:00:00 00:00:04 GGSCI (sourceSRV.izb.local) 2> stop EBKDMP1 Sending STOP request to EXTRACT EBKDMP1 ... Request processed. GGSCI (sourceSRV.izb.local) 3> info EBKEXT1 EXTRACT EBKEXT1 Last Started 2018-01-16 11:15 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:08 ago) Process ID 17209 Log Read Checkpoint Oracle Redo Logs 2018-01-16 12:36:12 Seqno 2664, RBA 5423616 SCN 0.474510079 (474510079) GGSCI (sourceSRV.izb.local) 4> stop EBKEXT1 Sending STOP request to EXTRACT EBKEXT1 ... Request processed. GGSCI (sourceSRV.izb.local) 5> cleanup EBKDMP1 Cleanup completed GGSCI (sourceSRV.izb.local) 6> dblogin userid ggate password "password" Successfully logged into database. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 7> cleanup EBKEXT1 Cleanup completed GGSCI (sourceSRV.izb.local as ggate@DBNAME) 8> delete EBKDMP1 Deleted EXTRACT EBKDMP1. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 9> delete EBKEXT1 Deleted EXTRACT EBKEXT1. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 10> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING
Be sure to delete any retail file: local retail and remote retail file. Any configuration can files can be located via:
GGSCI (sourceSRV.izb.local) 4> show all Parameter settings: SET DEBUG OFF Current directory: /u01/app/oracle/product/12.1.2/<instance release> Editor: vi Reports (.rpt) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirrpt Parameters (.prm) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirprm Replicat Checkpoints (.cpr) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirchk Extract Checkpoints (.cpe) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirchk Process Status (.pcs) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirpcs SQL Scripts (.sql) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirsql Database Definitions (.def) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirdef Dump files (.dmp) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirdmp Masterkey wallet files (.wlt) /u01/app/oracle/product/12.1.2/DBNAME_gg/dirwlt Credential store files (.crd) /u01/app/oracle/product/12.1.2/DBNAME_gg/dircrd
!!!!!P.S. DO NOT DELETE THE REDO LOG FILES :) !!!!!!
Configuration
In order to configure a export on the SOURCE, we should configure 3 jobs:
- Manager
- Extract Job ← Reads the redo
- Dump Job ← Takes the information from the previous job and dump it into retail file.
Be sure to clean any remaining files:
[oracle@sourceSRV dirdat]$ ls -lart total 8 drwxr-xr-x 29 oracle oinstall 4096 Nov 14 14:35 .. drwxr-x--- 2 oracle oinstall 4096 Jan 16 12:35 .
Configuration Files
Create the configuration file with the same name as you want the JOB name to be called.
Manager
[oracle@matar dirprm]$ cat mgr.prm PORT 7809 USERID ggate, PASSWORD "password!" DYNAMICPORTLIST 15010-15020 PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MinkeepHours 24 Autostart Extract EBK* AUTORESTART Extract *, WaitMinutes 2, Retries 6
Extract job: EBKEXT1
cat /u01/app/oracle/product/12.1.2/<instance name>/dirprm/ebkext1.prm Extract ebkext1 USERID ggate, PASSWORD "password" TRANLOGOPTIONS ASMUSER sys@ASM ASMPASSWORD "ASMPASSWORD" --TranlogOptions IntegratedParams (max_sga_size 256) Exttrail ./dirdat/lt LOGALLSUPCOLS DDL INCLUDE MAPPED UPDATERECORDFORMAT COMPACT Table SCHEMANAME1.* ; Table SCHEMANAME2.* ;
DUMP job: EBKDMP1
cat /u01/app/oracle/product/12.1.2/<instance name>/dirprm/ebkdmp1.prm
Extract EBKDMP1 USERID ggate, PASSWORD "password!" RMTHOST 10.200.11.73, MGRPORT 7809 RMTTRAIL ./dirdat/rt PASSTHRU Table schema_name1.* ; Table schema_name2.* ;
Add the job to the configuration
The jobs should be added to the configuration as well using the GoldenGate Software Command Interface(GGSCI)
[oracle@sourceSRV dirdat]$ /u01/app/oracle/product/12.1.2/DBNAME_gg/ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.3.0.1.0 OGGCORE_12.3.0.1.0_PLATFORMS_170721.0154_FBO Linux, x64, 64bit (optimized), Oracle 12c on Jul 21 2017 23:31:13 Operating system character set identified as UTF-8. Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved. GGSCI (sourceSRV.izb.local) 1> dblogin userid ggate password "password" Successfully logged into database. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 2> add extract EBKEXT1, TRANLOG, BEGIN NOW EXTRACT added. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 5> add exttrail ./dirdat/lt, EXTRACT EBKEXT1 EXTTRAIL added. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 6> add EXTRACT EBKDMP1, EXTTRAILSOURCE ./dirdat/lt EXTRACT added. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 7> add RMTTRAIL ./dirdat/rt, EXTRACT EBKDMP1 RMTTRAIL added. GGSCI (sourceSRV.izb.local as ggate@DBNAME) 8> ADD SCHEMATRANDATA SCHEMANAME1 <- Schema name 2018-01-16 12:41:32 INFO OGG-01788 SCHEMATRANDATA has been added on schema "SCHEMANAME1". 2018-01-16 12:41:32 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema "SCHEMANAME1". 2018-01-16 12:41:32 INFO OGG-10471 ***** Oracle Goldengate support information on table SCHEMANAME1.CM_AUTHORIZATION_CUSTOMER_BACKUP ***** Oracle Goldengate support native capture on table SCHEMANAME1.CM_AUTHORIZATION_CUSTOMER_BACKUP. Oracle Goldengate marked following column as key columns on table SCHEMANAME1.CM_AUTHORIZATION_CUSTOMER_BACKUP: ID, USER_PROFILE_ID, CUSTOMER_ID, ALL_ACCOUNT_AUTH_PACKAGE_ID, ALL_CARD_AUTH_PACKAGE_ID, CREATED_BY, CREATE_TS No unique key is defined for table SCHEMANAME1.CM_AUTHORIZATION_CUSTOMER_BACKUP. ***************************************************************************************** GGSCI (sourceSRV.izb.local as ggate@DBNAME) 9> add schematrandata SCHEMANAME2 2018-01-16 12:41:51 INFO OGG-01788 SCHEMATRANDATA has been added on schema "SCHEMANAME2". 2018-01-16 12:41:51 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema "SCHEMANAME2". 2018-01-16 12:41:51 INFO OGG-10471 ***** Oracle Goldengate support information on table SCHEMANAME2.ADMIN_INSTRUCTION ***** Oracle Goldengate support native capture on table SCHEMANAME2.ADMIN_INSTRUCTION. Oracle Goldengate marked following column as key columns on table SCHEMANAME2.ADMIN_INSTRUCTION: ID. *****************************************************************************************
After the server added configuration of the schema into the configuration, we can check and start the jobs:
GGSCI (sourceSRV.izb.local as ggate@DBNAME) 10> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STOPPED EBKDMP1 00:00:00 00:01:10 EXTRACT STOPPED EBKEXT1 00:00:00 00:03:33 GGSCI (sourceSRV.izb.local as ggate@DBNAME) 11> start EBKEXT1 Sending START request to MANAGER ... EXTRACT EBKEXT1 starting GGSCI (sourceSRV.izb.local as ggate@DBNAME) 12> start EBKDMP1 Sending START request to MANAGER ... EXTRACT EBKDMP1 starting GGSCI (sourceSRV.izb.local as ggate@DBNAME) 13> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING EBKDMP1 00:00:00 00:05:36 EXTRACT RUNNING EBKEXT1 00:07:52 00:00:08
Wait them for couple minutes, to assure that they will not end abnormally (ABEND)