Chủ Nhật, 31 tháng 7, 2022

[VIP5] Chuyển đổi dữ liệu DB DBAVIET sang DB mới bằng GoldenGate

-->
Mục đích: Chuyển đổi dữ liệu DB DBAVIET sang DB mới bằng datapump và GoldenGate

Mục lục:


I. DỰNG ĐỒNG BỘ GOLDENGATE TỪ PRODUCT SANG NEW

1. Export full metadata 2

2. Import 2

3. Cài GG 2

4. Cấu hình extract phase 1: 3

EXT1 3

PU_P1 4

RP_P1 5

init phase1 12

5. Cấu hình extract phase2 14

EXT2 14

PU_P2 14

RP_P2 15

init phase2 15

6. Cấu hình extract phase3 16

EXT3 16

PU_P3 17

init phase3 18

7. Cấu hình extract phase3 19

EXT4 19

PU_P4 19

RP_P4 20

init phase4 20

8. Cấu hình extract phase5 21

EXT5 22

PU_P5 22

RP_P5 23

init phase5 23

II.GO LIVE

EXT1 24

PU_P1 24

EXT2 25

PU_P2 25

EXT3 26

PU_P3 26

EXT4 27

PU_P4 27

EXT5 28

PU_P5 28

RP_P1 29

RP_P2 29

RP_P3 29

RP_P4 30

RP_P5 30


I. DỰNG ĐỒNG BỘ GOLDENGATE TỪ PRODUCT SANG NEW

1. Export full metadata

 

expdp \"/ as sysdba\" FULL=Y CLUSTER=NO DIRECTORY=VIETNH_EXP DUMPFILE=full_metadata_%U.dmp CONTENT=METADATA_ONLY LOGFILE=metadata.log EXCLUDE=STATISTICS parallel=8 REUSE_DUMPFILES=YES

2. Import

CREATE OR REPLACE DIRECTORY dump AS '/mig/dump';

 

impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=full_metadata.dmp LOGFILE=full_metadat.log TABLE_EXISTS_ACTION=SKIP PARALLEL=8

3. Cài GG

./runInstaller -silent -showProgress -waitforcompletion -responseFile /tmp/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp

 

4. Cấu hình extract pha 1:

Dblogin USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

 

ADD SCHEMATRANDATA DBAVIET2 ALLCOLS

DELETE TRANDATA DBAVIET2.GW_NE_REQ

DELETE TRANDATA DBAVIET2.GW_REQUEST

DELETE TRANDATA DBAVIET2.GW_REQUEST_HIS

DELETE TRANDATA DBAVIET2.GW_SESSION

DELETE TRANDATA DBAVIET2.GW_VIEW_NE_REQ

DELETE TRANDATA DBAVIET2.GW_VIEW_NE_REQ_OLD

DELETE TRANDATA DBAVIET2.GW_VIEW_REQUEST

DELETE TRANDATA DBAVIET2.GW_VIEW_REQUEST_OLD

DELETE TRANDATA DBAVIET2.SUM_SESSION_DAILY

DELETE TRANDATA DBAVIET2.SUM_TRANS_DAILY

DELETE TRANDATA DBAVIET2.SUM_TRANS_DAILY_NEW

DELETE TRANDATA DBAVIET2.SUM_TRANS_NE_DAILY

DELETE TRANDATA DBAVIET2.SUM_TRANS_NE_DAILY_NEW

 

EXT1

EXTRACT EXT1

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /ggate/ggate/dirdat/ext1/d1

DISCARDFILE /ggate/ggate/dirdat/ext1/d1.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE DBAVIET2.*;

SEQUENCE DBAVIET2.*;

TABLEEXCLUDE DBAVIET2.GW_NE_REQ;

TABLEEXCLUDE DBAVIET2.GW_REQUEST;

TABLEEXCLUDE DBAVIET2.GW_REQUEST_HIS;

TABLEEXCLUDE DBAVIET2.GW_SESSION;

TABLEEXCLUDE DBAVIET2.GW_VIEW_NE_REQ;

TABLEEXCLUDE DBAVIET2.GW_VIEW_NE_REQ_OLD;

TABLEEXCLUDE DBAVIET2.GW_VIEW_REQUEST;

TABLEEXCLUDE DBAVIET2.GW_VIEW_REQUEST_OLD;

TABLEEXCLUDE DBAVIET2.SUM_SESSION_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_DAILY_NEW;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_NE_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_NE_DAILY_NEW;

ggsci> ADD EXTRACT EXT1, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /ggate/ggate/dirdat/ext1/d1, EXTRACT EXT1, MEGABYTES 500

ggsci> START EXT1

 

 PU_P1

ggsci> edit params PU_P1

EXTRACT PU_P1

RMTHOST 192.168.45.202, MGRPORT 7809, COMPRESS

RMTTRAIL /mig/trail_file/P1/d1

PASSTHRU

TABLE DBAVIET2.*;

SEQUENCE DBAVIET2.*;

ggsci> ADD EXTRACT PU_P1, EXTTRAILSOURCE /ggate/ggate/dirdat/ext1/d1

ggsci> ADD RMTTRAIL /mig/trail_file/P1/d1, EXTRACT PU_P1, MEGABYTES 500

ggsci> START PU_P1

 

@marker_setup.sql

@ddl_setup.sql

@role_setup.sql

@ddl_enable.sql

@ddl_pin ggate

@sequence.sql

GGSCHEMA GGATE

CHECKPOINTTABLE GGATE.checkpoint

ggsci>  DBLOGIN USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

ggsci> ADD CHECKPOINTTABLE

CREATE TABLESPACE GGATE_DATA DATAFILE

  '+DATA' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED

LOGGING

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON;

alter system set enable_Goldengate_replication=TRUE scope=both;

RP_P1

REPLICAT RP_P1

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P1.dsc, Append

HANDLECOLLISIONS

MAP DBAVIET2.*, TARGET DBAVIET2.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P1, EXTTRAIL /mig/trail_file/P1/d1

START RP_P1, AFTERCSN 13568981648249

Disable FGA

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'AP_PARAM',

                                policy_name    => 'FGA_AP_PARAM'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'CMD_TEMPLATE',

                                policy_name    => 'FGA_CMD_TEMPLATE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'CMD_TEMPLATE_DETAIL',

                                policy_name    => 'FGA_CMD_TEMPLATE_DETAIL'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'CMD_TYPE',

                                policy_name    => 'FGA_CMD_TYPE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'DSP_GSA',

                                policy_name    => 'FGA_DSP_GSA'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GROUP_SERVER',

                                policy_name    => 'FGA_GROUP_SERVER'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_APP',

                                policy_name    => 'FGA_GW_APP'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_COMMAND',

                                policy_name    => 'FGA_GW_COMMAND'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_COMMAND_GROUP',

                                policy_name    => 'FGA_GW_COMMAND_GROUP'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_COMMAND_PROFILE',

                                policy_name    => 'FGA_GW_COMMAND_PROFILE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_DISPATCHER',

                                policy_name    => 'FGA_GW_DISPATCHER'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_DISPATCHER_TYPE',

                                policy_name    => 'FGA_GW_DISPATCHER_TYPE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_GATEWAY',

                                policy_name    => 'FGA_GW_GATEWAY'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_GATEWAY_GROUP',

                                policy_name    => 'FGA_GW_GATEWAY_GROUP'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_GATEWAY_PARAM',

                                policy_name    => 'FGA_GW_GATEWAY_PARAM'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_GATEWAY_PROFILE',

                                policy_name    => 'FGA_GW_GATEWAY_PROFILE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_POLICY_PROFILE',

                                policy_name    => 'FGA_GW_POLICY_PROFILE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_ROUTE',

                                policy_name    => 'FGA_GW_ROUTE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_ROUTE_DETAIL',

                                policy_name    => 'FGA_GW_ROUTE_DETAIL'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_ROUTE_GROUP',

                                policy_name    => 'FGA_GW_ROUTE_GROUP'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_ROUTE_PROFILE',

                                policy_name    => 'FGA_GW_ROUTE_PROFILE'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_SERVER',

                                policy_name    => 'FGA_GW_SERVER'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_SERVER_USER',

                                policy_name    => 'FGA_GW_SERVER_USER'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'WAPI_REQUEST',

                                policy_name    => 'FGA_WAPI_REQUEST'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_DISPATCHER_PARAM',

                                policy_name    => 'FGA_GW_DISPATCHER_PARAM'

                               );

END;

/

BEGIN

       DBMS_FGA.disable_policy (object_schema  => 'DBAVIET2',

                                object_name    => 'GW_COMMAND_PARAM',

                                policy_name    => 'FGA_GW_COMMAND_PARAM'

                               );

END;

/

 

 

Export phase1

init phase1

Querry current scn của database:

SQL>  select to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

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

13568981648249

Tạo parameter file exp_p1.par như sau:

###GENERAL_INFO

CLUSTER=NO

DIRECTORY=VIETNH_EXP

DUMPFILE=P1_%U.dmp

LOGFILE=export_p1.log

SCHEMAS=DBAVIET2

INCLUDE=TABLE:"NOT IN ('GW_NE_REQ','GW_REQUEST','GW_REQUEST_HIS','GW_SESSION','GW_VIEW_NE_REQ','GW_VIEW_NE_REQ_OLD','GW_VIEW_REQUEST','GW_VIEW_REQUEST_OLD','SUM_SESSION_DAILY','SUM_TRANS_DAILY','SUM_TRANS_DAILY_NEW','SUM_TRANS_NE_DAILY','SUM_TRANS_NE_DAILY_NEW')"

INCLUDE=SEQUENCE

PARALLEL=8

COMPRESSION=all

FLASHBACK_SCN=13568981648249

FILESIZE=20G

REUSE_DUMPFILES=YES

Dùng user oracle thực hiện lệnh sau để export:

nohup expdp \"/ as sysdba\" parfile=/backup4/congdc/dump_full/exp_p1.par &

 

nohup impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=P1_%U.dmp LOGFILE=phase_1.log TABLE_EXISTS_ACTION=REPLACE PARALLEL=8 

 

CREATE TABLESPACE LOB DATAFILE

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 33554416K AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,

  '+DATA' SIZE 12024M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED

LOGGING

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON;

 

5. Cấu hình extract phase2

 

ADD SCHEMATRANDATA APP2_OWNER

ADD SCHEMATRANDATA APP3_OWNER

 

EXT2

EXTRACT EXT2

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /ggate/ggate/dirdat/ext2/d2

DISCARDFILE /ggate/ggate/dirdat/ext2/d2.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP2_OWNER.*;

SEQUENCE APP2_OWNER.*;

TABLE APP3_OWNER.*;

SEQUENCE APP3_OWNER.*;

TABLEEXCLUDE APP2_OWNER.ACT_HI_ACTINST;

TABLEEXCLUDE APP2_OWNER.ACT_HI_VARINST;

TABLEEXCLUDE APP3_OWNER.GW_IREQUEST;

TABLEEXCLUDE APP3_OWNER.GW_OREQUEST;

TABLEEXCLUDE APP3_OWNER.GW_SESSION;

ggsci> ADD EXTRACT EXT2, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /ggate/ggate/dirdat/ext2/d2, EXTRACT EXT2, MEGABYTES 500

ggsci> START EXT2

PU_P2

ggsci> edit params PU_P2

EXTRACT PU_P2

RMTHOST 192.168.45.202, MGRPORT 7809, COMPRESS

RMTTRAIL /mig/trail_file/P2/d2

PASSTHRU

TABLE APP2_OWNER.*;

SEQUENCE APP2_OWNER.*;

TABLE APP3_OWNER.*;

SEQUENCE APP3_OWNER.*;

ggsci> ADD EXTRACT PU_P2, EXTTRAILSOURCE /ggate/ggate/dirdat/ext2/d2

ggsci> ADD RMTTRAIL /mig/trail_file/P2/d2, EXTRACT PU_P2, MEGABYTES 500

ggsci> START PU_P2

RP_P2

REPLICAT RP_P2

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P2.dsc, Append

HANDLECOLLISIONS

MAP APP2_OWNER.*, TARGET APP2_OWNER.*;

MAP APP3_OWNER.*, TARGET APP3_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P2, EXTTRAIL /mig/trail_file/P2/d2

START RP_P2, AFTERCSN 13569019122906

 

 init phase2

Querry current scn của database:

SQL>  select to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

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

13569019122906

Tạo parameter file exp_p2.par như sau:

###GENERAL_INFO

CLUSTER=NO

DIRECTORY=VIETNH_EXP

DUMPFILE=P2_%U.dmp

LOGFILE=export_p2.log

SCHEMAS=APP2_OWNER,APP3_OWNER

INCLUDE=TABLE:"NOT IN ('ACT_HI_ACTINST','GW_SESSION','ACT_HI_VARINST','GW_IREQUEST','GW_OREQUEST')"

INCLUDE=SEQUENCE

PARALLEL=8

COMPRESSION=all

FLASHBACK_SCN=13569019122906

FILESIZE=20G

REUSE_DUMPFILES=YES

Dùng user oracle thực hiện lệnh sau để export:

nohup expdp \"/ as sysdba\" parfile=/backup4/congdc/dump_full/exp_p2.par &


Sau đó import vào DB New: 

nohup impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=P2_%U.dmp LOGFILE=phase_2.log TABLE_EXISTS_ACTION=REPLACE PARALLEL=8

 

6. Cấu hình extract phase3

 

 

ADD SCHEMATRANDATA APP1_OWNER

ADD SCHEMATRANDATA DBAVIET_MTV

ADD SCHEMATRANDATA PCK_OWNER

 

EXT3

EXTRACT EXT3

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /ggate/ggate/dirdat/ext3/d3

DISCARDFILE /ggate/ggate/dirdat/ext3/d3.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP1_OWNER.*;

SEQUENCE APP1_OWNER.*;

TABLE DBAVIET_MTV.*;

SEQUENCE DBAVIET_MTV.*;

TABLE PCK_OWNER.*;

SEQUENCE PCK_OWNER.*;

TABLEEXCLUDE DBAVIET_MTV.GW_NE_REQ;

TABLEEXCLUDE DBAVIET_MTV.GW_REQUEST;

TABLEEXCLUDE DBAVIET_MTV.GW_SESSION;

TABLEEXCLUDE DBAVIET_MTV.SUM_SESSION_DAILY;

TABLEEXCLUDE DBAVIET_MTV.SUM_TRANS_DAILY;

TABLEEXCLUDE DBAVIET_MTV.SUM_TRANS_NE_DAILY;

ggsci> ADD EXTRACT EXT3, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /ggate/ggate/dirdat/ext3/d3, EXTRACT EXT3, MEGABYTES 500

ggsci> START EXT3

PU_P3

ggsci> edit params PU_P3

EXTRACT PU_P3

RMTHOST 192.168.45.202, MGRPORT 7809, COMPRESS

RMTTRAIL /mig/trail_file/P3/d3

PASSTHRU

TABLE APP1_OWNER.*;

SEQUENCE APP1_OWNER.*;

TABLE DBAVIET_MTV.*;

SEQUENCE DBAVIET_MTV.*;

TABLE PCK_OWNER.*;

SEQUENCE PCK_OWNER.*;

ggsci> ADD EXTRACT PU_P3, EXTTRAILSOURCE /ggate/ggate/dirdat/ext3/d3

ggsci> ADD RMTTRAIL /mig/trail_file/P3/d3, EXTRACT PU_P3, MEGABYTES 500

ggsci> START PU_P3

 

REPLICAT RP_P3

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P3.dsc, Append

HANDLECOLLISIONS

MAP APP1_OWNER.*, TARGET APP1_OWNER.*;

MAP DBAVIET_MTV.*, TARGET DBAVIET_MTV.*;

MAP PCK_OWNER.*, TARGET PCK_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P3, EXTTRAIL /mig/trail_file/P3/d3

START RP_P3, AFTERCSN 13569105865786

init phase3

Querry current scn của database:

SQL>  select to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

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

13569105865786

Tạo parameter file exp_p3.par như sau:

###GENERAL_INFO

CLUSTER=NO

DIRECTORY=VIETNH_EXP

DUMPFILE=P3_%U.dmp

LOGFILE=export_p3.log

SCHEMAS=APP1_OWNER,DBAVIET_MTV,PCK_OWNER

INCLUDE=TABLE:"NOT IN ('GW_NE_REQ','GW_REQUEST','GW_SESSION','SUM_SESSION_DAILY','SUM_TRANS_DAILY','SUM_TRANS_NE_DAILY')"

INCLUDE=SEQUENCE

PARALLEL=8

FLASHBACK_SCN=13569105865786

FILESIZE=20G

REUSE_DUMPFILES=YES

Dùng user oracle thực hiện lệnh sau để export:

nohup expdp \"/ as sysdba\" parfile=/backup4/congdc/dump_full/exp_p3.par & 


nohup impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=P3_%U.dmp LOGFILE=phase_3.log TABLE_EXISTS_ACTION=REPLACE PARALLEL=8

7. Cấu hình extract phase4

  

ADD SCHEMATRANDATA DBAVIET_TEST

ADD SCHEMATRANDATA ESIM_TEST

 

EXT4

EXTRACT EXT4

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /ggate/ggate/dirdat/ext4/d4

DISCARDFILE /ggate/ggate/dirdat/ext4/d4.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE DBAVIET_TEST.*;

SEQUENCE DBAVIET_TEST.*;

TABLE ESIM_TEST.*;

SEQUENCE ESIM_TEST.*;

TABLEEXCLUDE DBAVIET_TEST.GW_NE_REQ;

TABLEEXCLUDE DBAVIET_TEST.GW_REQUEST;

TABLEEXCLUDE DBAVIET_TEST.GW_REQUEST_BK;

TABLEEXCLUDE DBAVIET_TEST.GW_SESSION;

TABLEEXCLUDE DBAVIET_TEST.GW_VIEW_NE_REQ;

TABLEEXCLUDE DBAVIET_TEST.GW_VIEW_REQUEST;

ggsci> ADD EXTRACT EXT4, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /ggate/ggate/dirdat/ext4/d4, EXTRACT EXT4, MEGABYTES 500

ggsci> START EXT4

PU_P4

ggsci> edit params PU_P4

EXTRACT PU_P4

RMTHOST 192.168.45.202, MGRPORT 7809, COMPRESS

RMTTRAIL /mig/trail_file/P4/d4

PASSTHRU

TABLE DBAVIET_TEST.*;

SEQUENCE DBAVIET_TEST.*;

TABLE ESIM_TEST.*;

SEQUENCE ESIM_TEST.*;

ggsci> ADD EXTRACT PU_P4, EXTTRAILSOURCE /ggate/ggate/dirdat/ext4/d4

ggsci> ADD RMTTRAIL /mig/trail_file/P4/d4, EXTRACT PU_P4, MEGABYTES 500

ggsci> START PU_P4

 

RP_P4

REPLICAT RP_P4

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P4.dsc, Append

HANDLECOLLISIONS

MAP DBAVIET_TEST.*, TARGET DBAVIET_TEST.*;

MAP ESIM_TEST.*, TARGET ESIM_TEST.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P4, EXTTRAIL /mig/trail_file/P4/d4

START RP_P4, AFTERCSN 13569122986311

 

 init phase4

Querry current scn của database:

SQL>  select to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

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

13569122986311

Tạo parameter file exp_p4.par như sau:

###GENERAL_INFO

CLUSTER=NO

DIRECTORY=VIETNH_EXP

DUMPFILE=P4_%U.dmp

LOGFILE=export_p4.log

SCHEMAS=DBAVIET_TEST,ESIM_TEST

INCLUDE=TABLE:"NOT IN ('GW_NE_REQ','GW_REQUEST','GW_REQUEST_BK','GW_SESSION','GW_VIEW_NE_REQ','GW_VIEW_REQUEST')"

INCLUDE=SEQUENCE

PARALLEL=8

FLASHBACK_SCN=13569122986311

FILESIZE=20G

REUSE_DUMPFILES=YES

Dùng user oracle thực hiện lệnh sau để export:

nohup expdp \"/ as sysdba\" parfile=/backup4/congdc/dump_full/exp_p4.par & 

nohup impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=P4_%U.dmp LOGFILE=phase_4.log TABLE_EXISTS_ACTION=REPLACE PARALLEL=8 

expdp \"/ as sysdba\" CLUSTER=NO DIRECTORY=VIETNH_EXP DUMPFILE=TABLE_%U.dmp PARALLEL=6 CONTENT=METADATA_ONLY TABLES=DBAVIET_MTV.GW_NE_REQ,DBAVIET_MTV.GW_REQUEST,DBAVIET_MTV.GW_SESSION,DBAVIET_MTV.SUM_SESSION_DAILY,DBAVIET_MTV.SUM_TRANS_DAILY,DBAVIET_MTV.SUM_TRANS_NE_DAILY,DBAVIET_TEST.GW_NE_REQ,DBAVIET_TEST.GW_REQUEST,DBAVIET_TEST.GW_REQUEST_BK,DBAVIET_TEST.GW_SESSION,DBAVIET_TEST.GW_VIEW_NE_REQ,DBAVIET_TEST.GW_VIEW_REQUEST,DBAVIET2.GW_NE_REQ,DBAVIET2.GW_REQUEST,DBAVIET2.GW_REQUEST_HIS,DBAVIET2.GW_SESSION,DBAVIET2.GW_VIEW_NE_REQ,DBAVIET2.GW_VIEW_NE_REQ_OLD,DBAVIET2.GW_VIEW_REQUEST,DBAVIET2.GW_VIEW_REQUEST_OLD,DBAVIET2.SUM_SESSION_DAILY,DBAVIET2.SUM_TRANS_DAILY,DBAVIET2.SUM_TRANS_DAILY_NEW,DBAVIET2.SUM_TRANS_NE_DAILY,DBAVIET2.SUM_TRANS_NE_DAILY_NEW,APP2_OWNER.ACT_HI_ACTINST,APP2_OWNER.ACT_HI_VARINST,APP3_OWNER.GW_IREQUEST,APP3_OWNER.GW_OREQUEST,APP3_OWNER.GW_SESSION

 

impdp system/0racle DIRECTORY=DUMP TABLES=DBAVIET_MTV.GW_NE_REQ,DBAVIET_MTV.GW_REQUEST,DBAVIET_MTV.GW_SESSION,DBAVIET_MTV.SUM_SESSION_DAILY,DBAVIET_MTV.SUM_TRANS_DAILY,DBAVIET_MTV.SUM_TRANS_NE_DAILY,DBAVIET_TEST.GW_NE_REQ,DBAVIET_TEST.GW_REQUEST,DBAVIET_TEST.GW_REQUEST_BK,DBAVIET_TEST.GW_SESSION,DBAVIET_TEST.GW_VIEW_NE_REQ,DBAVIET_TEST.GW_VIEW_REQUEST,DBAVIET2.GW_NE_REQ,DBAVIET2.GW_REQUEST,DBAVIET2.GW_REQUEST_HIS,DBAVIET2.GW_SESSION,DBAVIET2.GW_VIEW_NE_REQ,DBAVIET2.GW_VIEW_NE_REQ_OLD,DBAVIET2.GW_VIEW_REQUEST,DBAVIET2.GW_VIEW_REQUEST_OLD,DBAVIET2.SUM_SESSION_DAILY,DBAVIET2.SUM_TRANS_DAILY,DBAVIET2.SUM_TRANS_DAILY_NEW,DBAVIET2.SUM_TRANS_NE_DAILY,DBAVIET2.SUM_TRANS_NE_DAILY_NEW,APP2_OWNER.ACT_HI_ACTINST,APP2_OWNER.ACT_HI_VARINST,APP3_OWNER.GW_IREQUEST,APP3_OWNER.GW_OREQUEST,APP3_OWNER.GW_SESSION CLUSTER=NO DUMPFILE=full_metadata.dmp LOGFILE=full_metadata.log TABLE_EXISTS_ACTION=SKIP PARALLEL=8 REMAP_TABLESPACE=DATA202011:DATA REMAP_TABLESPACE=DATATBS:DATA REMAP_TABLESPACE=GW_DATA:DATA REMAP_TABLESPACE=DATA202103:DATA

 

 

 8. Cấu hình extract phase5

Querry current scn của database:

SQL>  select to_char(current_scn) from v$database;

 

TO_CHAR(CURRENT_SCN)

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

13554318983159

 

 

ADD TRANDATA APP2_OWNER.ACT_HI_ACTINST

ADD TRANDATA APP2_OWNER.ACT_HI_VARINST

ADD TRANDATA APP3_OWNER.GW_IREQUEST

ADD TRANDATA APP3_OWNER.GW_OREQUEST

ADD TRANDATA APP3_OWNER.GW_SESSION

 

EXT5

EXTRACT EXT5

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /ggate/ggate/dirdat/ext5/d5

DISCARDFILE /ggate/ggate/dirdat/ext5/d5.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP2_OWNER.ACT_HI_ACTINST;

TABLE APP2_OWNER.ACT_HI_VARINST;

TABLE APP3_OWNER.GW_IREQUEST;

TABLE APP3_OWNER.GW_OREQUEST;

TABLE APP3_OWNER.GW_SESSION;

ggsci> ADD EXTRACT EXT5, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /ggate/ggate/dirdat/ext5/d5, EXTRACT EXT5, MEGABYTES 500

ggsci> START EXT5

PU_P5 

ggsci> edit params PU_P5

EXTRACT PU_P5

RMTHOST 192.168.45.202, MGRPORT 7809, COMPRESS

RMTTRAIL /mig/trail_file/P5/d5

PASSTHRU

TABLE APP2_OWNER.*;

TABLE APP3_OWNER.*;

ggsci> ADD EXTRACT PU_P5, EXTTRAILSOURCE /ggate/ggate/dirdat/ext5/d5

ggsci> ADD RMTTRAIL /mig/trail_file/P5/d5, EXTRACT PU_P5, MEGABYTES 500

ggsci> START PU_P5

 RP_P5

REPLICAT RP_P5

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P5.dsc, Append

HANDLECOLLISIONS

MAP APP2_OWNER.*, TARGET APP2_OWNER.*;

MAP APP3_OWNER.*, TARGET APP3_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P5, EXTTRAIL /mig/trail_file/P5/d5

START RP_P5, AFTERCSN 13569129218255

 

init phase5

  

expdp \"/ as sysdba\" CLUSTER=NO DIRECTORY=VIETNH_EXP DUMPFILE=P5_%U.dmp PARALLEL=4  TABLES=APP2_OWNER.ACT_HI_ACTINST,APP2_OWNER.ACT_HI_VARINST,APP3_OWNER.GW_IREQUEST, APP3_OWNER.GW_OREQUEST,APP3_OWNER.GW_SESSION FLASHBACK_SCN=13569129218255 LOGFILE=export_p5.log REUSE_DUMPFILES=YES

 

impdp system/0racle DIRECTORY=DUMP FULL=YES CLUSTER=NO DUMPFILE=P5_%U.dmp LOGFILE=phase_5.log TABLE_EXISTS_ACTION=TRUNCATE PARALLEL=8 REMAP_TABLESPACE=DATA202011:DATA REMAP_TABLESPACE=DATATBS:DATA REMAP_TABLESPACE=GW_DATA:DATA REMAP_TABLESPACE=DATA202103:DATA

 


 

II. GOLIVE

 Tạo các tiến trình extract, pump trên dest và replicate trên source

EXT1

EXTRACT EXT1

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /mig/trail_file/P1/d5,FORMAT RELEASE 11.1

DISCARDFILE /mig/trail_file/P1/d5.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE DBAVIET2.*;

SEQUENCE DBAVIET2.*;

TABLEEXCLUDE DBAVIET2.GW_NE_REQ;

TABLEEXCLUDE DBAVIET2.GW_REQUEST;

TABLEEXCLUDE DBAVIET2.GW_REQUEST_HIS;

TABLEEXCLUDE DBAVIET2.GW_SESSION;

TABLEEXCLUDE DBAVIET2.GW_VIEW_NE_REQ;

TABLEEXCLUDE DBAVIET2.GW_VIEW_NE_REQ_OLD;

TABLEEXCLUDE DBAVIET2.GW_VIEW_REQUEST;

TABLEEXCLUDE DBAVIET2.GW_VIEW_REQUEST_OLD;

TABLEEXCLUDE DBAVIET2.SUM_SESSION_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_DAILY_NEW;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_NE_DAILY;

TABLEEXCLUDE DBAVIET2.SUM_TRANS_NE_DAILY_NEW;

ggsci> ADD EXTRACT EXT1, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /mig/trail_file/P1/d5, EXTRACT EXT1, MEGABYTES 500

ggsci> START EXT1

PU_P1

edit params PU_P1

EXTRACT PU_P1

RMTHOST 10.50.9.11, MGRPORT 7809, COMPRESS

RMTTRAIL /ggate/ggate/dirdat/ext1/d5,FORMAT RELEASE 11.1

PASSTHRU

TABLE DBAVIET2.*;

SEQUENCE DBAVIET2.*;

ggsci> ADD EXTRACT PU_P1, EXTTRAILSOURCE /mig/trail_file/P1/d5

ggsci> ADD RMTTRAIL /ggate/ggate/dirdat/ext1/d5, EXTRACT PU_P1, MEGABYTES 500

ggsci> START PU_P1

 

EXT2

EXTRACT EXT2

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /mig/trail_file/P2/d6,FORMAT RELEASE 11.1

DISCARDFILE /mig/trail_file/P2/d6.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP2_OWNER.*;

SEQUENCE APP2_OWNER.*;

TABLE APP3_OWNER.*;

SEQUENCE APP3_OWNER.*;

TABLEEXCLUDE APP2_OWNER.ACT_HI_ACTINST;

TABLEEXCLUDE APP2_OWNER.ACT_HI_VARINST;

TABLEEXCLUDE APP3_OWNER.GW_IREQUEST;

TABLEEXCLUDE APP3_OWNER.GW_OREQUEST;

TABLEEXCLUDE APP3_OWNER.GW_SESSION;

ggsci> ADD EXTRACT EXT2, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /mig/trail_file/P2/d6, EXTRACT EXT2, MEGABYTES 500

ggsci> START EXT2

PU_P2

ggsci> edit params PU_P2

EXTRACT PU_P2

RMTHOST 10.50.9.11, MGRPORT 7809, COMPRESS

RMTTRAIL /ggate/ggate/dirdat/ext2/d6,FORMAT RELEASE 11.1

PASSTHRU

TABLE APP2_OWNER.*;

SEQUENCE APP2_OWNER.*;

TABLE APP3_OWNER.*;

SEQUENCE APP3_OWNER.*;

ggsci> ADD EXTRACT PU_P2, EXTTRAILSOURCE /mig/trail_file/P2/d6

ggsci> ADD RMTTRAIL /ggate/ggate/dirdat/ext2/d6, EXTRACT PU_P2, MEGABYTES 500

ggsci> START PU_P2

 

EXT3

EXTRACT EXT3

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /mig/trail_file/P3/d7,FORMAT RELEASE 11.1

DISCARDFILE /mig/trail_file/P3/d7.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP1_OWNER.*;

SEQUENCE APP1_OWNER.*;

TABLE DBAVIET_MTV.*;

SEQUENCE DBAVIET_MTV.*;

TABLE PCK_OWNER.*;

SEQUENCE PCK_OWNER.*;

TABLEEXCLUDE DBAVIET_MTV.GW_NE_REQ;

TABLEEXCLUDE DBAVIET_MTV.GW_REQUEST;

TABLEEXCLUDE DBAVIET_MTV.GW_SESSION;

TABLEEXCLUDE DBAVIET_MTV.SUM_SESSION_DAILY;

TABLEEXCLUDE DBAVIET_MTV.SUM_TRANS_DAILY;

TABLEEXCLUDE DBAVIET_MTV.SUM_TRANS_NE_DAILY;

ggsci> ADD EXTRACT EXT3, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /mig/trail_file/P3/d7, EXTRACT EXT3, MEGABYTES 500

ggsci> START EXT3

PU_P3 

ggsci> edit params PU_P3

EXTRACT PU_P3

RMTHOST 10.50.9.11, MGRPORT 7809, COMPRESS

RMTTRAIL /ggate/ggate/dirdat/ext3/d7,FORMAT RELEASE 11.1

PASSTHRU

TABLE APP1_OWNER.*;

SEQUENCE APP1_OWNER.*;

TABLE DBAVIET_MTV.*;

SEQUENCE DBAVIET_MTV.*;

TABLE PCK_OWNER.*;

SEQUENCE PCK_OWNER.*;

ggsci> ADD EXTRACT PU_P3, EXTTRAILSOURCE /mig/trail_file/P3/d7

ggsci> ADD RMTTRAIL /ggate/ggate/dirdat/ext3/d7, EXTRACT PU_P3, MEGABYTES 500

ggsci> START PU_P3

 

EXT4

EXTRACT EXT4

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /mig/trail_file/P4/d8,FORMAT RELEASE 11.1

DISCARDFILE /mig/trail_file/P4/d8.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE DBAVIET_TEST.*;

SEQUENCE DBAVIET_TEST.*;

TABLE ESIM_TEST.*;

SEQUENCE ESIM_TEST.*;

TABLEEXCLUDE DBAVIET_TEST.GW_NE_REQ;

TABLEEXCLUDE DBAVIET_TEST.GW_REQUEST;

TABLEEXCLUDE DBAVIET_TEST.GW_REQUEST_BK;

TABLEEXCLUDE DBAVIET_TEST.GW_SESSION;

TABLEEXCLUDE DBAVIET_TEST.GW_VIEW_NE_REQ;

TABLEEXCLUDE DBAVIET_TEST.GW_VIEW_REQUEST;

ggsci> ADD EXTRACT EXT4, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /mig/trail_file/P4/d8, EXTRACT EXT4, MEGABYTES 500

ggsci> START EXT4

PU_P4 

ggsci> edit params PU_P4

EXTRACT PU_P4

RMTHOST 10.50.9.11, MGRPORT 7809, COMPRESS

RMTTRAIL /ggate/ggate/dirdat/ext4/d8,FORMAT RELEASE 11.1

PASSTHRU

TABLE DBAVIET_TEST.*;

SEQUENCE DBAVIET_TEST.*;

TABLE ESIM_TEST.*;

SEQUENCE ESIM_TEST.*;

ggsci> ADD EXTRACT PU_P4, EXTTRAILSOURCE /mig/trail_file/P4/d8

ggsci> ADD RMTTRAIL /ggate/ggate/dirdat/ext4/d8, EXTRACT PU_P4, MEGABYTES 500

ggsci> START PU_P4

 

EXT5

EXTRACT EXT5

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

EXTTRAIL /mig/trail_file/P5/d9,FORMAT RELEASE 11.1

DISCARDFILE /mig/trail_file/P5/d9.dsc, APPEND , MEGABYTES 1024

TRANLOGOPTIONS DBLOGREADER

DDL INCLUDE MAPPED

EOFDELAY 30

TABLE APP2_OWNER.ACT_HI_ACTINST;

TABLE APP2_OWNER.ACT_HI_VARINST;

TABLE APP3_OWNER.GW_IREQUEST;

TABLE APP3_OWNER.GW_OREQUEST;

TABLE APP3_OWNER.GW_SESSION;

ggsci> ADD EXTRACT EXT5, TRANLOG, THREADS 2, BEGIN NOW

ggsci> ADD EXTTRAIL /mig/trail_file/P5/d9, EXTRACT EXT5, MEGABYTES 500

ggsci> START EXT5

 

PU_P5

ggsci> edit params PU_P5

EXTRACT PU_P5

RMTHOST 10.50.9.11, MGRPORT 7809, COMPRESS

RMTTRAIL /ggate/ggate/dirdat/ext5/d9,FORMAT RELEASE 11.1

PASSTHRU

TABLE APP2_OWNER.*;

TABLE APP3_OWNER.*;

ggsci> ADD EXTRACT PU_P5, EXTTRAILSOURCE /mig/trail_file/P5/d9

ggsci> ADD RMTTRAIL /ggate/ggate/dirdat/ext5/d9, EXTRACT PU_P5, MEGABYTES 500

ggsci> START PU_P5

 

RP_P1 

 

REPLICAT RP_P1

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P1.dsc, Append

HANDLECOLLISIONS

MAP DBAVIET2.*, TARGET DBAVIET2.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P1, EXTTRAIL /ggate/ggate/dirdat/ext1/d5

START RP_P1

RP_P2 

REPLICAT RP_P2

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P2.dsc, Append

HANDLECOLLISIONS

MAP APP2_OWNER.*, TARGET APP2_OWNER.*;

MAP APP3_OWNER.*, TARGET APP3_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P2, EXTTRAIL /ggate/ggate/dirdat/ext2/d6

START RP_P2

 RP_P3

REPLICAT RP_P3

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P3.dsc, Append

HANDLECOLLISIONS

MAP APP1_OWNER.*, TARGET APP1_OWNER.*;

MAP DBAVIET_MTV.*, TARGET DBAVIET_MTV.*;

MAP PCK_OWNER.*, TARGET PCK_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P3, EXTTRAIL /ggate/ggate/dirdat/ext3/d7

START RP_P3

RP_P4 

REPLICAT RP_P4

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P4.dsc, Append

HANDLECOLLISIONS

MAP DBAVIET_TEST.*, TARGET DBAVIET_TEST.*;

MAP ESIM_TEST.*, TARGET ESIM_TEST.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P4, EXTTRAIL /ggate/ggate/dirdat/ext4/d8

START RP_P4

 RP_P5

REPLICAT RP_P5

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)

USERID ggate, PASSWORD AACAAAAAAAAAAALANEBCXFTIBDQHSCKDGDHDHCTDCAZAVGLB, ENCRYPTKEY DEFAULT

DDL Include Mapped

ASSUMETARGETDEFS

DDLERROR DEFAULT IGNORE

DDLOPTIONS REPORT

DiscardFile dirrpt/P5.dsc, Append

HANDLECOLLISIONS

MAP APP2_OWNER.*, TARGET APP2_OWNER.*;

MAP APP3_OWNER.*, TARGET APP3_OWNER.*;

Add tiến trình replicat và start đồng bộ:

ADD REPLICAT RP_P5, EXTTRAIL /ggate/ggate/dirdat/ext5/d9

START RP_P5


=============================
* KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE trực tiếp từ tôi giúp bạn bước đầu trở thành những chuyên gia DBA, đủ kinh nghiệm đi thi chứng chỉ OA/OCP, đặc biệt là rất nhiều kinh nghiệm, bí kíp thực chiến trên các hệ thống Core tại VN chỉ sau 1 khoá học.
* CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
* Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile: 0902912888
⚡️ Skype: tranbinh48ca
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: http://bit.ly/ytb_binhoraclemaster
👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhoracle
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,khóa học pl/sql, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, middleware, hoc solaris, hoc linux, hoc aix, unix, securecrt, xshell, mobaxterm, putty

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master