its monday morning, and most of the time i’m doing nothing. my bz day of the week is from Tuesday to Thursday.hmmmm sometime friday.
today, a colleague of mine from other side of the world handover me a task to resync a table that being use for our goldengate replication.
1. exclude table need to be resync
2. check if no lag on repicat side.
3. stop replicat and extract
4. export table using datapump.
expdp system tables=aradmin.B2575,aradmin.T2575,aradmin.T927,aradmin.T2577 directory=datapumpdir logfile=forresync.log dumpfile=forresync.dmp flashback_scn=1094039936906
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** tables=aradmin.B2575,aradmin.T2575,aradmin.T927,aradmin.T2577 directory=datapumpdir logfile=forresync.log dumpfile=forresync.dmp flashback_scn=1094039936906 Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 406.1 MB Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS . . exported "ARADMIN"."T2575" 169.0 MB 403751 rows . . exported "ARADMIN"."T2577" 161.1 MB 836768 rows . . exported "ARADMIN"."B2575" 4.034 MB 156265 rows . . exported "ARADMIN"."T927" 522.9 KB 1692 rows Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is: /backup/PD01RMDY/forresync.dmp Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 02:31:51
5. import table on target, using impdp use TABLE_EXISTS_ACTION=replace parameter to automaticall replace the table.
impdp system/oracle tables=aradmin.B2575,aradmin.T2575,aradmin.T927,aradmin.T2577 directory=datapumpdir logfile=forresync_restore.log dumpfile=forresync.dmp TABLE_EXISTS_ACTION=replace
Import: Release 11.1.0.7.0 - 64bit Production on Monday, 22 April, 2013 2:31:59 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TABLE_01": system/******** tables=aradmin.B2575,aradmin.T2575,aradmin.T927,aradmin.T2577 directory=datapumpdir logfile=forresync_restore.log dumpfile=forresync.dmp TABLE_EXISTS_ACTION=replace Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "ARADMIN"."T2575" 169.0 MB 403751 rows . . imported "ARADMIN"."T2577" 161.1 MB 836768 rows . . imported "ARADMIN"."B2575" 4.034 MB 156265 rows . . imported "ARADMIN"."T927" 522.9 KB 1692 rows Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at 02:32:45
6. start both extract and replicat