Wednesday, January 13, 2016

Start Extract to Re-positioning !!!



Start Extract to Re-positioning / How to start extract to point-in-time.


we mostly add extract as below

add extract finance ,tranlog begin now

This will make extract to start when you added extract.So the transactions which
 commited before we added extract will not capture.


Add the Extract group by issuing the ADD EXTRACT command with a timestamp as the
BEGIN option, or by using ADD EXTRACT with the SEQNO and RBA options. It is best to give
Extract a known start point at which to begin extracting data, rather than by using the
NOW argument.


ADD EXTRACT finance, TRANLOG, BEGIN 2011-01-01 12:00:00.000000

If data that Extract needs during processing was not retained, either in online or archived
logs, one of the following corrective actions might be required:
? Alter Extract to capture from a later point in time for which log data is available (and
accept possible data loss on the target).


ALTER EXTRACT 
[,ADD EXTRACT {PARAMETERS} 
[, UPGRADE INTEGRATED TRANLOG]
[, DOWNGRADE INTEGRATED TRANLOG]
[, THREAD ]
[, ETROLLOVER]

ALTER EXTRACT finance, TRANLOG, BEGIN 2011-01-01 12:00:00.000000


If you has to start EXTRACT at certain RBA , this could be achieved as below. 

ALTER EXTRACT finance,EXTSEQNO   ,EXTRBA

You can also ALTER recovery Checkpoint. but this is not wise and Even Oracle does
 not support.

Alter the ioextseqno and ioextrba of recovery checkpoint back to its original recovery 

checkpoint position

Below seqno & RBA can be seen by INFO ,detail
In this example,

Alter extract , ioextseqno , ioextrba 


To determine the oldest log that Extract might need at any
given point, issue the SEND EXTRACT command with the SHOWTRANS option.

You can also start Replicat  at Point in time using  , where CSN (commit sequence number ) is
 SCN (system change number)  for Oracle database.


START REPLICAT 
[SKIPTRANSACTION | ATCSN | AFTERCSN ]


if your replicat is abended and you ALTER it with BEGIN NOW, its status will change to
STOPPED.

---

When using Goldengate to instantiate target database from an Oracle source database, replicat process can be started to coincide with extract based the method used for instantiation, e.g. RMAN or datapump.
> ATCSN is used to start replicat if RMAN is used to instantiate target.
From Database Backup and Recovery Reference, UNTIL SCN specifies an SCN as an upper limit.
RMAN restore or recover up to but not including the specified SCN.

> AFTERCSN is used to start replicat if datapump is used to instantiate target.
The export operation performed is consistent as of FLASHBACK_SCN.
Hope this helps to clear up when to use ATCSN versus AFTERCSN.tarting from "that SCN+1". Transaction with that SCN isn't included.

    No comments: