Ogg new table issued detailed steps and related considerations

Source: Internet
Author: User

Original Address http://www.cnblogs.com/dc-chen/p/7324525.html

I. Background:

Work task Ogg New published, according to the system structure, the data issued process is: system a--> system B--> system C

System A: Add the related table in the parameter file of the extraction process (EXTSJXF) related to System B, and add the related table in the parameter file of the drop process (DPDJZSJ1) related to System B.

System B: The copy process (REPDJZ2) of the parameter file added to the relevant table, the application, in the system C-related extraction process (EXTJHXT1) of the parameter file in the new publication, the same, the delivery process (DPJHSJ1) also need to add in the Process parameter file table

System c: Copy process (REPJHXT1) parameter File New related table

Post Note: Business issues, System a user QAS data will be imported to System B user qas_test (remap table), namely

System A:qas.t_log_ticket_province, QAS. T_log_ticket_task_province

System B:qas_test. T_log_ticket_province, Qas_test. T_log_ticket_task_province

Through DataPump initialization, the overall workflow is as follows:

second, the work steps:

1. System A--> system B

(1) System A extraction process extsjxf modify parameter file

Ggsci (a)1> Stop EXTSJXF  -stop process for parameter file modification
Ggsci (a)2> Edit param extsjxf  --- Edit the parameter file add the following
--20170808 add 
TABLE qas.*      ;
--Log on to the database goldengate user, open Table-level additional log
3>dblogin userid goldengate password goldengate;
4>add trandata QAS. T_log_ticket_province
5>add trandata QAS. T_log_ticket_task_province
6> Start EXTSJXF

(2) System a delivery process DPDJZSJ1 modify the parameter file

7> Stop DPDJZSJ1
8> Edit param DPDJZSJ1
--20170808 add
TABLE qas.*  ;

(3) Stop system B copy process REPDJZ2

1> Stop REPDJZ2

(4) System a based on the SCN number to extract data estimated data size

sql> Select sum (bytes/1024/1024) MB from dba_segments where owner = ' QAS ' and Segment_name= ' T_log_ Ticket_province ';

        MB
----------
  560.0625

sql> Select sum (bytes/1024/1024) MB from Dba_ segments where owner = ' QAS ' and segment_name= ' t_log_ticket_task_province ';

        MB
----------
 1816.0625
Define Export Directory
Sql> Create directory OGG_EXPDP as '/DATA4/OGG_EXPDP ';

Query SCN number

9999999999999999
Sql> select Current_scn from V$database;

      CURRENT_SCN
-----------------
      15585673221354
Edit EXPDP Execute script and execute
VI expdp_testa_testb_oas_20170808.par
USERID    = "/As SYSDBA"
DIRECTORY = OGG_EXPDP
 15585673221354
dumpfile  = expdp_testa_testb_oas_20170808.dmp
logfile   = Expdp_testa_ Testb_oas_20170808.log
Tables  = (QAS. T_log_ticket_province,    
          QAS. t_log_ticket_task_province)
--Background execution script
nohup EXPDP parfile=expdp_testa_testb_oas_20170808.par >expdp_ TestA_testB_oas_20170808.par.out &
SCP passes DMP file from System A to system B
$SCP expdp_testa_testb_oas_20170808.dmp oracle@ System B IP: Passed directory

(6) System B Import data, there are related import directory, using remap user OAS data into the guide OAS_GZDS under

VI impdp_testa_testb_oas_20170808.par
USERID  = '/as Sysdba '
DIRECTORY = IMPDP
dumpfile  = expdp_ Testa_testb_oas_20170808.dmp
LogFile   = Impdp_testa_testb_oas_20170808.log 
remap_schema=qas:qas_test Remap_tablespace=users:ts_qas_test table_exists_action=replace--Background execution script 
nohup IMPDP parfile=impdp_testa_testb_ Oas_20170808.par > Impdp_testA_testB_oas_20170808.par.out &

(7) System B copy process REPDJZ2 parameter file modification

2> Edit param REPDJZ2
--20170808add
MAP qas.*        , TARGET qas_test.*    , FILTER (@GETENV (" TRANSACTION "," CSN ") >15585673221354);  --System a based on the SCN number, System B based on CSN number open application

(8) Open the delivery process of system a DPDJZSJ1

> Start DPDJZSJ1

(9) Open the application process of system B REPDJZ2

3> Start REPDJZ2

(10) Data comparison./ggsci to view the relevant statistics

> Stats dpdjzsj1,daily
4> Stats repdjz2,daily
Querying data volumes in a database
--System A:
sql> select count (1) from QAS. t_log_ticket_task_province;

  Count (1)
----------
  16919333

sql> Select count (1) from QAS. t_log_ticket_province;

  COUNT (1)
----------
   4618927
---system B:
sql> Select count (1) From Qas_gzds. t_log_ticket_task_province;

  Count (1)
----------
  16919333

sql> Select count (1) from QAS_GZDS . t_log_ticket_province;

  COUNT (1)
----------
   4618927

2, System B--> system C

(1) System B extraction process EXTJHXT1 new post

Ggsci (B) of> Stop EXTJHXT1 ggsci (B) -> Edit param EXTJHXT1--20170808 add 2tbs TABLE qas_test.
T_log_ticket_province; TABLE Qas_test.

T_log_ticket_task_province; Ggsci (B) -> dblogin userid goldengate password goldengate; Ggsci (B) -> ADD trandata qas_gzds. T_log_ticket_province Logging of supplemental Redo data enabled for table QAS_GZDS.
T_log_ticket_province. Ggsci (B) A> Info trandata qas_gzds. T_log_ticket_province Logging of supplemental redo LOG data is enabled for table Qas_gzds.
T_log_ticket_province. Columns supplementally logged for table Qas_gzds.
t_log_ticket_province:ticket_id. Ggsci (B) -> ADD trandata qas_gzds. T_log_ticket_task_province Logging of supplemental Redo data enabled for table QAS_GZDS.
T_log_ticket_task_province. Ggsci (B) -> Info trandata qas_gzds. T_log_ticket_task_province Logging of supplemental redo LOG data is enabled for table Qas_gzds.
T_log_ticket_task_province. Columns supplementally logged for table Qas_gzds.
t_log_ticket_task_province:task_id. Ggsci (B) -> Start EXTJHXT1--Open the extraction process EXTJHXT1

(2) System B delivery process DPJHSJ1 add table and stop

> Stop DPJHSJ1
> Edit param DPJHSJ1
--20170808 add 2tbs
TABLE qas_test. T_log_ticket_province       ;
TABLE Qas_test. T_log_ticket_task_province  ;

(3) System C replication process REPJHXT1 stop

> Stop REPJHXT1

(4) System B based on the SCN number extraction data query system B of the SCN number

9999999999999999
Sql> select Current_scn from V$database;

      CURRENT_SCN
-----------------
      15389350836731
Edit EXPDP Execute script and execute
VI expdp_testb_testc_2tb_20170808.par
userid= '/as Sysdba '
DIRECTORY=IMPDP
logfile=expdp_testb_ Testc_2tb_20170808.log
flashback_scn=15389350836731
dumpfile=expdp_testb_testc_2tb_ 20170808.dmp
tables= (qas_gzds. T_log_ticket_province,
qas_gzds. t_log_ticket_task_province)
--Background script execution
nohup EXPDP parfile=expdp_testb_testc_2tb_20170808.par > Expdp_ TestB_testC_2tb_20170808.par.out &

(5) SCP passes DMP files from system B to system C

$SCP expdp_testb_testc_2tb_20170808.dmp oracle@ System C IP: Passed directory

(6) System C Import data

VI impdp_testb_testc_2tb_20170808.par
userid= '/as Sysdba '
DIRECTORY=IMPDP
logfile=impdp_testb_testc_ 2tb_20170808.log
dumpfile=expdp_testb_testc_2tb_20170808.dmp
table_exists_action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.