Showing posts with label Golden Gate. Show all posts
Showing posts with label Golden Gate. Show all posts

Wednesday, October 26, 2016

Golden Gate : logdump >>  Find BAD or Corrupt trail files :

/path/ggs]$ logdump

Logdump 1 >open /opt/oracle/ggs/dirdat/ff000042
Current LogTrail is /opt/oracle/ggs/dirdat/ff000042
Logdump 2 >ghdr on
Logdump 4 >pos last
Reading forward from RBA 7702542
Logdump 5 >sfh prev
Scanned   16384 bytes
Scanned   32768 bytes
Scanned   49152 bytes
Scanned   65536 bytes
Scanned   65564 bytes and did not find a header
Logdump 6 >pos 0
Reading forward from RBA 0
Logdump 7 >count
Bad record found at RBA 7631536, format 5.50 Header token)     <<<<<<< Bad Files hence Trail file corrupted
0000 0000                                         | ....
LogTrail /opt/oracle/ggs/dirdat/ff000042 has 8861 records
Total Data Bytes           6592327
  Avg Bytes/Record             743
Insert                        5900
FieldComp                       42
LargeObject                   2918
Others                           1
After Images                  8860

Average of 5891 Transactions
    Bytes/Trans .....       1191
    Records/Trans ...          1
    Files/Trans .....          0

Logdump 8 >exit
Golden Gate Sync Using EXPDP and IMPDP :

1. Find CURRENT_SCN or FLASHBACK SCN:
select CURRENT_SCN, dbms_flashback.get_system_change_number from v$database;
 
2. No need to stop the EXRACT and REPLICATE
   Source: EXPDP with FLASHBACK_SCN = 999999999
   scp expdp dump file to target server 

3. Target: IMPDP – import Metadata and data
STOP EXTRACT 
STOP REPLICATE
Added following command into REPLICATE.prm file for NEW TABLE only:
MAP Schema_Name.New_Table_Name ,TARGET Schema_Name.New_Table_Name ,
FILTER ( @GETENV ("TRANSACTION", "CSN") > 999999999);
START EXTRACT 
START REPLICATE
Golden Gate Sync Using EXPDP and IMPDP :

1. Find CURRENT_SCN or FLASHBACK SCN:
select CURRENT_SCN, dbms_flashback.get_system_change_number from v$database;
 
2. No need to stop the EXRACT and REPLICATE
   Source: EXPDP with FLASHBACK_SCN = 999999999
   scp expdp dump file to target server 

3. Target: IMPDP – import Metadata and data
STOP EXTRACT 
STOP REPLICATE
Added following command into REPLICATE.prm file for NEW TABLE only:
MAP Schema_Name.New_Table_Name ,TARGET Schema_Name.New_Table_Name ,
FILTER ( @GETENV ("TRANSACTION", "CSN") > 999999999);
START EXTRACT 
START REPLICATE