goldengate配置案例之二(基于scn的oracle数据泵)

#源库:

GGSCI (dc03) 13> add extract extdac, tranlog, begin now
EXTRACT added.


GGSCI (dc03) 14> edit params extdac

 

GGSCI (dc03) 15> view params extdac

--checkparams
extract extdac
userid ggt,password ggt
tranlogoptions asmuser sys@asm,asmpassword AACAAAAAAAAAAADAZCTHZIQBDIEAIHLI,encryptkey default
--rmthost dc02, mgrport 7809
exttrail /exp/ggs/dirdat/dac/ex
--rmttrail /exp/ggs/dirdat/dac/re
discardfile /exp/ggs/dirrpt/extdac.dsc,append, megabytes 100
gettruncates
table cpdds_pdata.PUB_JNL_SAV;


GGSCI (dc03) 16> add exttrail /exp/ggs/dirdat/dac/ex, extract extdac
EXTTRAIL added.


GGSCI (dc03) 17> delete rmttrail /exp/ggs/dirdat/dac/re


GGSCI (dc03) 18> start extdac

Sending START request to MANAGER ...
EXTRACT EXTDAC starting

GGSCI (dc03) 19> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EXTDAA      00:00:00      00:00:04
EXTRACT     RUNNING     EXTDAB      00:00:00      00:00:04
EXTRACT     RUNNING     EXTDAC      00:04:27      00:00:00
EXTRACT     RUNNING     EXTDDS      00:00:00      00:00:06
EXTRACT     RUNNING     EXTWHY      00:00:00      00:00:06
EXTRACT     RUNNING     PUMPDAA     00:00:00      00:00:00
EXTRACT     RUNNING     PUMPWHY     00:00:00      00:00:06


GGSCI (dc03) 20> info extdac detail

EXTRACT    EXTDAC    Last Started 2010-12-23 17:00   Status RUNNING
Checkpoint Lag       00:03:57 (updated 00:00:01 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2010-12-23 16:57:10  Seqno 7970, RBA 835943868

  Target Extract Trails:

  Remote Trail Name                                Seqno        RBA     Max MB

  /exp/ggs/dirdat/dac/ex                               0        910         10

  Extract Source                          Begin             End

  /vic/arch/dc03/1_7970_734461099.dbf     2010-12-23 16:51  2010-12-23 16:57
  Not Available                           * Initialized *   2010-12-23 16:51


Current directory    /home/ggs

Report file          /home/ggs/dirrpt/EXTDAC.rpt
Parameter file       /home/ggs/dirprm/extdac.prm
Checkpoint file      /home/ggs/dirchk/EXTDAC.cpe
Process file         /home/ggs/dirpcs/EXTDAC.pce
Stdout file          /home/ggs/dirout/EXTDAC.out
Error log            /home/ggs/ggserr.log

GGSCI (dc03) 21> view report extdac


***********************************************************************
                 Oracle GoldenGate Capture for Oracle
                     Version 11.1.1.0.0 Build 078
   Linux, x64, 64bit (optimized), Oracle 10 on Jul 28 2010 15:39:00

Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.


                    Starting at 2010-12-23 17:00:23
***********************************************************************

Operating System Version:
Linux
Version #1 SMP Wed Nov 7 14:07:22 EST 2007, Release 2.6.9-67.ELlargesmp
Node: dc03
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited

Process id: 7863

Description:

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
--checkparams
extract extdac
userid ggt,password ***
tranlogoptions asmuser sys@asm,asmpassword ******************************************* default
--rmthost dc02, mgrport 7809
exttrail /exp/ggs/dirdat/dac/ex
--rmttrail /exp/ggs/dirdat/dac/re
discardfile /exp/ggs/dirrpt/extdac.dsc,append, megabytes 100
gettruncates
table cpdds_pdata.PUB_JNL_SAV;

2010-12-23 17:00:23  INFO    OGG-01635  BOUNDED RECOVERY: reset to initial or altered checkpoint.

Bounded Recovery Parameter:
Options    = BRRESET
BRINTERVAL = 4HOURS
BRDIR      = /home/ggs

CACHEMGR virtual memory values (may have been adjusted)
CACHEBUFFERSIZE:                         64K
CACHESIZE:                                8G
CACHEBUFFERSIZE (soft max):               4M
CACHEPAGEOUTSIZE (normal):                4M
PROCESS VM AVAIL FROM OS (min):          16G
CACHESIZEMAX (strict force to disk):  13.99G

Database Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE     = "AMERICAN"
NLS_TERRITORY    = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"

Maximum supported ASM read buffer size is 28 KB

2010-12-23 17:00:24  INFO    OGG-01515  Positioning to begin time Dec 23, 2010 4:51:12 PM.

2010-12-23 17:00:36  INFO    OGG-01516  Positioned to Sequence 7968, RBA 449509392, Dec 23, 2010 4:51:12 PM.

2010-12-23 17:00:36  INFO    OGG-01052  No recovery is required for target file /exp/ggs/dirdat/dac/ex000000, at RBA 0 (file n
ot opened).

2010-12-23 17:00:36  INFO    OGG-01478  Output file /exp/ggs/dirdat/dac/ex is using format RELEASE 10.4/11.1.

***********************************************************************
**                     Run Time Messages                             **
***********************************************************************


2010-12-23 17:00:37  INFO    OGG-01517  Position of first record processed Sequence 7968, RBA 449509392, SCN 2802.772013086, D
ec 23, 2010 4:51:12 PM.


GGSCI (dc03) 22>
GGSCI (dc03) 24> add extract pumpdac, exttrailsource /exp/ggs/dirdat/dac/ex
EXTRACT added.


GGSCI (dc03) 25> edit params pumpdac

 

GGSCI (dc03) 26> view params pumpdac

extract pumpdac
rmthost dc02, mgrport 7809
passthru
rmttrail /exp/ggs/dirdat/dac/re
table cpdds_pdata.PUB_JNL_SAV;


GGSCI (dc03) 29> add rmttrail /exp/ggs/dirdat/dac/re, extract PUMPDAC
RMTTRAIL added.


GGSCI (dc03) 30> start PUMPDAC

Sending START request to MANAGER ...
EXTRACT PUMPDAC starting

GGSCI (dc03) 7> exit

[ggs@dc03 ~]$


[ggs@dc03 ~]$ sqlplus cpdds_pdata/cpdds_pdata

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Dec 23 17:10:08 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining Scoring Engine and Real Application Testing options

SQL> select min(START_TIME) from v$transaction;

MIN(START_TIME)
--------------------
12/23/10 09:25:16

SQL> select sysdate from dual;

SYSDATE
------------
23-DEC-10

SQL> alter session set nls_date_format='yyyymmdd hh24:mi:ss';

Session altered.

SQL> select sysdate from dual;

SYSDATE
-----------------
20101223 17:11:29

SQL> select to_char(dbms_flashback.get_system_change_number,99999999999999999999999999) from dual;

TO_CHAR(DBMS_FLASHBACK.GET_
---------------------------
             12035272641452

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining Scoring Engine and Real Application Testing options

[oracle@dc03 dpdir]$ more expdp01.par
#ESTIMATE_ONLY=y
#ESTIMATE=blocks
#tables=TB_ATM_CASSETTL,TB_ATM_CHKBAL,TB_ATM_CHKBAL_BOX,TB_ATM_SWITCH,TB_ATM_TYPE,TB_CARD_REL,TB_ERROR,TB_TRAN_TYPE,TB_ATM_TRA
NS_HIS
tables=PUB_JNL_SAV
#query=TCS_INDPTY_AGMT_RELA_H:"where D_INSERT_DATE between to_date('20101201 00:00:00','yyyymmdd hh24:mi:ss') and to_date('201
01202 05:45:20','yyyymmdd hh24:mi:ss')"
#schemas=corp_sz
#content=METADATA_ONLY
#remap_tablespace=TMP_GRP01:temp
filesize=4000m
parallel=4
directory=dpdir
dumpfile=ggs_%U.dp
#dumpfile=corp_01.dp,corp_02.dp
logfile=expdp01.log
#logfile=impcorp.log
#remap_schema=atm:atm_fx
flashback_scn=12035272641452
[oracle@dc03 dpdir]$
[oracle@dc03 dpdir]$ expdp cpdds_pdata/cpdds_pdata parfile=expdp01.par

Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 December, 2010 17:17:18

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining Scoring Engine and Real Application Testing options
Starting "CPDDS_PDATA"."SYS_EXPORT_TABLE_03":  cpdds_pdata/******** parfile=expdp01.par
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 198.7 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
.................................
.................................


#目标库:
[oracle@datacent02 dpdir]$ more impdp01.par
#ESTIMATE_ONLY=y
#ESTIMATE=blocks
#tables=TB_ATM_CASSETTL,TB_ATM_CHKBAL,TB_ATM_CHKBAL_BOX,TB_ATM_SWITCH,TB_ATM_TYPE,TB_CARD_REL,TB_ERROR,TB_TRAN_TYPE,TB_ATM_TRA
NS_HIS
tables=PUB_JNL_SAV
TABLE_EXISTS_ACTION=truncate
#schemas=cpdds_pdata
#content=METADATA_ONLY
parallel=4
directory=dpdir
#dumpfile=atm_%U.dp
dumpfile=ggs_01.dp,ggs_02.dp,ggs_03.dp,ggs_04.dp,ggs_05.dp,ggs_06.dp,ggs_07.dp,ggs_08.dp,ggs_09.dp,ggs_10.dp,ggs_11.dp,ggs_12.
dp,ggs_13.dp,ggs_14.dp,ggs_15.dp,ggs_16.dp,ggs_17.dp,ggs_18.dp,ggs_19.dp,ggs_20.dp,ggs_21.dp,ggs_22.dp,ggs_23.dp,ggs_24.dp,ggs
_25.dp,ggs_26.dp,ggs_27.dp,ggs_28.dp,ggs_29.dp,ggs_30.dp,ggs_31.dp,ggs_32.dp,ggs_33.dp,ggs_34.dp,ggs_35.dp,ggs_36.dp,ggs_37.dp
,ggs_38.dp,ggs_39.dp,ggs_40.dp,ggs_41.dp,ggs_42.dp,ggs_43.dp,ggs_44.dp,ggs_45.dp,ggs_46.dp,ggs_47.dp,ggs_48.dp,ggs_49.dp
#logfile=expatm.log
logfile=impdp01.log
#remap_schema=atm:atm_fx
[oracle@datacent02 dpdir]$
[oracle@datacent02 dpdir]$ impdp cpdds_pdata/cpdds_pdata parfile=impdp01.par

..............................................
..............................................

GGSCI (datacent02.localdomain) 14> add replicat repdac, exttrail /exp/ggs/dirdat/dac/re, checkpointtable dac_chkpt
REPLICAT added.


GGSCI (datacent02.localdomain) 15> edit params repdac

 

GGSCI (datacent02.localdomain) 16> view params repdac

replicat repdac
assumetargetdefs
userid ggt,password ggt
discardfile ./dirrpt/repdac.dsc,append,megabytes 100
gettruncates
map cpdds_pdata.PUB_JNL_SAV, target cpdds_pdata.PUB_JNL_SAV;


GGSCI (datacent02.localdomain) 17> start repdac, aftercsn 12035272641452

你可能感兴趣的:(goldengate)