In one of my earlier posts, we discussed how to setup and use Integrated Capture mode as well as how to use the Downstream Mining Database option of the integrated capture mode.
Let us now see how to upgrade the classic capture to an integrated capture.
To recap, the main difference between the classic caoture and integrated capture modes is that in the classic capture the extract reads the Oracle database online (and archved as the case may be) redo log files to capture changes while in the integrated capture mode the database log mining server reads the redo log files and captures changes in the form of LCR’s (Logical Change Records) which are then accessed by the Golden Gate extract process.
Let us see an example of this upgrade process.
In this case we have an (classic capture) extract group called testme. We have just for the purpose of this example created a straight forward extract group without any datapump extract group.
GGSCI (pdemvrhl062) 2> ADD EXTRACT testme, TRANLOG BEGIN NOW EXTRACT added. GGSCI (pdemvrhl062) 3> ADD RMTTRAIL ./dirdat/ie EXTRACT testme RMTTRAIL added. GGSCI (pdemvrhl062) 5> EDIT PARAMS testme EXTRACT testme USERID ggate, PASSWORD ggate RMTHOST 10.32.xxx.xx, MGRPORT 7809 RMTTRAIL ./dirdat/ie TABLE sh.countries; GGSCI (pdemvrhl062) 7> START EXTRACT testme Sending START request to MANAGER ... EXTRACT TESTME starting
We can see that once the extract process has started, it is reading the online redo log files of the database – so we know that is a classic extract.
GGSCI (pdemvrhl062) 8> INFO EXTRACT testme EXTRACT TESTME Last Started 2013-02-08 17:26 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:02:32 ago) Log Read Checkpoint Oracle Redo Logs 2013-02-08 17:23:42 Seqno 75, RBA 1308688 SCN 0.0 (0)
To upgrade the classic capture to integrated capture, we need to stop the extract process first and register it with the database.
GGSCI (pdemvrhl062) 13> STOP EXTRACT testme Sending STOP request to EXTRACT TESTME ... Request processed. GGSCI (pdemvrhl062) 14> REGISTER EXTRACT testme DATABASE 2013-02-08 17:37:34 WARNING OGG-02064 Oracle compatibility version 11.2.0.0.0 has limited datatype support for integrated capture. Version 11.2.0.3 required for full support. 2013-02-08 17:38:22 INFO OGG-02003 Extract TESTME successfully registered with database at SCN 3114483.
We can now check and see if the extract can be upgraded.
In my case I have noticed an error message as shown below stating that the extract cannot be upgraded at this stage.
GGSCI (pdemvrhl062) 13> STOP EXTRACT testme Sending STOP request to EXTRACT TESTME ... Request processed. GGSCI (pdemvrhl062) 14> REGISTER EXTRACT testme DATABASE 2013-02-08 17:37:34 WARNING OGG-02064 Oracle compatibility version 11.2.0.0.0 has limited datatype support for integrated capture. Version 11.2.0.3 required for full support. 2013-02-08 17:38:22 INFO OGG-02003 Extract TESTME successfully registered with database at SCN 3114483. GGSCI (pdemvrhl062) 4> INFO testme UPGRADE ERROR: Extract TESTME is not ready to be upgraded because recovery SCN 3114444 has not reached SCN 3114483.
To work around this error, I have issued the ALTER EXTRACT command and started and then immediately stopped the extract.
GGSCI (pdemvrhl062) 5> ALTER EXTRACT testme TRANLOG BEGIN NOW EXTRACT altered. GGSCI (pdemvrhl062) 7> START EXTRACT testme Sending START request to MANAGER ... EXTRACT TESTME starting GGSCI (pdemvrhl062) 8> INFO EXTRACT testme EXTRACT TESTME Last Started 2013-02-08 17:44 Status RUNNING Checkpoint Lag 00:00:42 (updated 00:00:01 ago) Log Read Checkpoint Oracle Redo Logs 2013-02-08 17:44:05 Seqno 84, RBA 44048 SCN 0.0 (0) GGSCI (pdemvrhl062) 9> STOP EXTRACT testme Sending STOP request to EXTRACT TESTME ... Request processed.
Now we see that the extract is in a position to be upgraded.
GGSCI (pdemvrhl062) 10> INFO testme UPGRADE Extract TESTME is ready to be upgraded to integrated capture.
To upgrade the classic capture extract we use the UPGRADE INTEGRATED TRANLOG command as shown below.
GGSCI (pdemvrhl062) 11> ALTER EXTRACT testme , UPGRADE INTEGRATED TRANLOG Extract TESTME successfully upgraded to integrated capture. GGSCI (pdemvrhl062) 12> START EXTRACT testme Sending START request to MANAGER ... EXTRACT TESTME starting GGSCI (pdemvrhl062) 13> INFO EXTRACT testme EXTRACT TESTME Initialized 2013-02-08 17:44 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:01:57 ago) Log Read Checkpoint Oracle Integrated Redo Logs 2013-02-08 17:44:59 SCN 0.3142900 (3142900)
We can see that the extract is no longer reading the redo log files. Note the difference between the classic capture and integrated captrure.
Classic
Log Read Checkpoint Oracle Redo Logs 2013-02-08 17:44:05 Seqno 84, RBA 44048 SCN 0.0 (0)
Integrated
Log Read Checkpoint Oracle Integrated Redo Logs 2013-02-08 17:44:59 SCN 0.3142900 (3142900)
We can see that after the upgrade to integrated capture has taken place, a queue and queue table have been created in the database.
SQL> select CAPTURE_NAME, QUEUE_NAME, STATUS from DBA_CAPTURE; CAPTURE_NAME QUEUE_NAME STATUS ------------------------------ ------------------------------ -------- OGG$CAP_TESTME OGG$Q_TESTME ENABLED SQL> select OWNER, QUEUE_TABLE, QUEUE_TYPE from dba_queues 2 where NAME='OGG$Q_TESTME'; OWNER QUEUE_TABLE ------------------------------ ------------------------------ QUEUE_TYPE -------------------- GGATE OGG$Q_TAB_TESTME NORMAL_QUEUE