{"id":10,"date":"2013-11-13T08:49:00","date_gmt":"2013-11-13T08:49:00","guid":{"rendered":"http:\/\/anjo.pt\/wp\/keyword-oracle\/2013\/11\/13\/goldengate-refresh-single-table\/"},"modified":"2015-11-17T20:27:23","modified_gmt":"2015-11-17T19:27:23","slug":"goldengate-refresh-single-table","status":"publish","type":"post","link":"https:\/\/anjo.pt\/keyword-oracle\/2013\/11\/13\/goldengate-refresh-single-table\/","title":{"rendered":"Goldengate &#8211; Refresh single table"},"content":{"rendered":"<p>With the recent versions of GoldenGate &gt;11.2 you can see the current SCN on with the extract process is reading, even when it is stopped:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">GGSCI&gt; INFO E_TEST<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">EXTRACT &nbsp;E_TEST &nbsp;Last Started 2013-11-13 03:50 &nbsp; Status STOPPED<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">Checkpoint Lag &nbsp; &nbsp; &nbsp; 00:00:00 (updated 00:00:02 ago)<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">Log Read Checkpoint &nbsp;Oracle Redo Logs<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2013-11-13 09:32:34 &nbsp;Seqno 508717, RBA 4366336<\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SCN 78.1156360444 (336163809532)<\/span><\/p>\n<div>\n<\/div>\n<div>\nThis makes it easiear to refresh a single table on a GoldenGate replication, if you can allow a small delay. There can be this need if you discover that it does not match anymore, or if you need to add a new table to the configuration. For that you do, in case of a Oracle to Oracle replication:<\/div>\n<div>\n<\/div>\n<div>\n1 &#8211; Stop extract process and do INFO &lt;extract&gt; (see above). Note down the SCN between parentheses.<\/div>\n<div>\n2 &#8211; Add the table to the parameter file (or remove an existing TABLEEXCLUDE on extract process or MAPEXCLUDE on replicat process)&nbsp;<\/div>\n<div>\n3 &#8211; Export the table from the source with FLASHBACK_SCN parameter pointing to the SCN taken from parameter 1.<\/div>\n<div>\n4 &#8211; Make sure the replicat process has no delay with the command LAG &lt;replicat&gt;. You should get &#8220;At EOF, no more records to process.&#8221;<\/div>\n<div>\n<div>\n<span style=\"font-family: Courier New, Courier, monospace;\">GGSCI&gt; LAG R_TEST<\/span><\/div>\n<div>\n<span style=\"font-family: Courier New, Courier, monospace;\">Sending GETLAG request to REPLICAT R_TEST &#8230;<\/span><\/div>\n<div>\n<span style=\"font-family: Courier New, Courier, monospace;\">Last record lag: 4 seconds.<\/span><\/div>\n<div>\n<span style=\"font-family: Courier New, Courier, monospace;\">At EOF, no more records to process.<\/span><\/div>\n<\/div>\n<div>\n<\/div>\n<div>\n5 &#8211; Import the table at the destination (with TABLE_EXISTS=REPLACE, if needed)<\/div>\n<div>\n6 &#8211; Re-start the extract process.<\/div>\n<div>\n<\/div>\n<div>\nYou can make the operation simpler if you have a database link between destination and source. In that case you skip the step 3 and use directly the FLASHBACK_SCN on step 5:<\/div>\n<div>\n<span style=\"font-family: Courier New, Courier, monospace;\">impdp NETWORK_LINK=source_db TABLES=test.table1 EXCLUDE=TRIGGER<\/span>&nbsp;<\/div>\n<div>\n<\/div>\n<div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With the recent versions of GoldenGate &gt;11.2 you can see the current SCN on with the extract process is reading, even when it is stopped: GGSCI&gt; INFO E_TEST EXTRACT &nbsp;E_TEST &nbsp;Last Started 2013-11-13 03:50 &nbsp; Status STOPPED Checkpoint Lag &nbsp; &nbsp; &nbsp; 00:00:00 (updated 00:00:02 ago) Log Read Checkpoint &nbsp;Oracle Redo Logs &nbsp; &nbsp; &nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":{"0":"post-10","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-goldengate","7":"category-oracle","8":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":1,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/10\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}