{"id":1420,"date":"2018-05-15T10:21:25","date_gmt":"2018-05-15T02:21:25","guid":{"rendered":"http:\/\/www.royalwzy.com\/?p=1420"},"modified":"2018-05-15T10:21:25","modified_gmt":"2018-05-15T02:21:25","slug":"goldengate%e5%ad%a6%e4%b9%a07-%e5%85%b6%e5%ae%83%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=1420","title":{"rendered":"GoldenGate\u5b66\u4e607&#8211;\u5176\u5b83\u95ee\u9898"},"content":{"rendered":"<p>1.truncate\u64cd\u4f5c\u8981\u5355\u72ec\u5904\u7406,\u5728EXTRACT\u548cREPLICAT\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0GETTRUNCATES;<br \/>\n2.\u4e3b\u952e\u7684\u89e3\u51b3\u529e\u6cd5:\u4e00\u4e2a\u751f\u6210\u5947\u6570,\u4e00\u4e2a\u751f\u6210\u5076\u6570<br \/>\nDatabase-generated values<br \/>\nDo not replicate database-generated sequential values in a bi-directional configuration.<br \/>\nThe range of values must be different on each system, with no chance of overlap. For<br \/>\nexample, in a two-database environment, you can have one server generate even values,<br \/>\nand the other odd. For an n-server environment, start each key at a different value and<br \/>\nincrement the values by the number of servers in the environment. This method may not<br \/>\nbe available to all types of applications or databases. If the application permits, you can<br \/>\nadd a location identifier to the value to enforce uniqueness.<\/p>\n<p>\u963b\u6b62\u6570\u636e\u5faa\u73af<br \/>\n1.\u963b\u6b62\u62bd\u53d6\u590d\u5236\u7684\u64cd\u4f5c:<br \/>\n     1.GETAPPLOPS|IGNOREAPPLOPS<br \/>\n     2.GETREPLICATES|IGNOREREPLICATES<br \/>\n2.\u6807\u8bc6\u590d\u5236\u7684\u4e8b\u52a1:<br \/>\n     TRANLOGOPTIONS EXCLUDEUSER <user name><br \/>\n     TRANLOGOPTIONS EXCLUDEUSERID <\/user><user -id><\/p>\n<p>\u4e2d\u95f4\u4e3b\u952e\u51b2\u7a81\u4e86\u600e\u4e48\u529e;<br \/>\n\u4e3b\u5e93\u5b95\u673a\u4e86\uff0c\u5269\u4f59\u6570\u636e\u662f\u5426\u4f1a\u540c\u6b65\u5230\u5907\u673a;<\/p>\n<p>mgr<br \/>\nPURGEOLDEXTRACTS \/opt\/gg\/trails\/w1*, USECHECKPOINTS, MINKEEPFILES 10<br \/>\nPURGEOLDEXTRACTS \/opt\/gg\/trails\/w2*, USECHECKPOINTS, MINKEEPFILES 10<br \/>\nAUTORESTART ER *, RETRIES 3, WAITMINUTES 5<br \/>\nPURGEDDLHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30<br \/>\nPURGEMARKERHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30<\/p>\n<p>init data on soruce<br \/>\n1.add extract eintss, soruceistable<br \/>\n2.edit params eintss<br \/>\nEXTRACT eintss<br \/>\nuserid system, password &#8220;oracle&#8221;<br \/>\nrmthost xxx, mgrport 7809<br \/>\nrmttask replicat, group riniss<br \/>\ntable gg.*;<\/p>\n<p>init data on target<br \/>\n3. add replicat riniss, specialrun<br \/>\ninfo replicat *, tasks;<br \/>\n4.edit params riniss<br \/>\nreplicat riniss<br \/>\nassumetargetdefs<br \/>\nuserid system, password oracle<br \/>\ndiscardfile .\/dirrpt\/RINISS.dsc, purge<br \/>\nmap gg.*, target gg.*;<\/p>\n<p>on source<br \/>\n5.start extract einiss;<br \/>\nview report einitss;<br \/>\n6.view report riniss<\/p>\n<p>source 2 target  on source<br \/>\n1.ADD EXTRACT ext_s2t, TRANLOG, BEGIN NOW, THREADS 1<br \/>\nEXTRACT ext_s2t<br \/>\nUSERID system, PASSWORD oracle<br \/>\nEXTTRAIL .\/dirdat\/st<br \/>\nDLL INCLUDE MAPPED<br \/>\nTABLE gg.*;<\/p>\n<p>2.ADD EXTTRAIL .\/dirdat\/st, EXTRACT ext_s2t<\/p>\n<p>3.ADD EXTRACT pump_sr, EXTTRAILSOURCE .\/dirdat\/st, BEGIN NOW<br \/>\nEXTRACT pump_sr<br \/>\nUSERID system, PASSWORD oracle<br \/>\nRMTHOST 192.168.10.12, MGRPORT 7809<br \/>\nRMTTRAIL .\/dirdat\/tt<br \/>\nPASSTHRU<\/p>\n<p>TABLE gg.*;<\/p>\n<p>4.ADD RMTTRAIL .\/dirdat\/tt, EXTRACT pump_sr<\/p>\n<p>source 2 target  on target<br \/>\n5.ADD REPLICAT repl_tt, EXTTRAIL .\/dirdat\/tt, BEGIN NOW<br \/>\nREPLICAT repl_tt<br \/>\nASSUMETARGETDEFS<br \/>\nDLL INCLUDE MAPPED<br \/>\nUSERID system, PASSWORD oracle<br \/>\nDISCARDFILE .\/dirrpt\/repl_tt.dsc, PURGE<br \/>\nMAP gg.*, TARGET gg.*;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\ntarget 2 source on target<br \/>\n1.ADD EXTRACT ext_t2s, TRANLOG, BEGIN NOW, THREADS 1<br \/>\nEXTRACT ext_t2s<br \/>\nUSERID system, PASSWORD oracle<br \/>\nEXTTRAIL .\/dirdat\/ts<br \/>\nDLL INCLUDE MAPPED<br \/>\nTABLE gg.*;<\/p>\n<p>2.ADD EXTTRAIL .\/dirdat\/ts, EXTRACT ext_t2s<\/p>\n<p>3.ADD EXTRACT pump_tt, EXTTRAILSOURCE .\/dirdat\/ts, BEGIN NOW<br \/>\nEXTRACT pump_tt<br \/>\nUSERID system, PASSWORD oracle<br \/>\nRMTHOST 192.168.10.11, MGRPORT 7809<br \/>\nRMTTRAIL .\/dirdat\/ss<br \/>\nPASSTHRU<br \/>\nTABLE gg.*;<\/p>\n<p>4.ADD RMTTRAIL .\/dirdat\/ss, EXTRACT pump_tt<\/p>\n<p>target 2 source on srouce<br \/>\n5.ADD REPLICAT repl_ss, EXTTRAIL .\/dirdat\/ss, BEGIN NOW<br \/>\nREPLICAT repl_ss<br \/>\nASSUMETARGETDEFS<br \/>\nDLL INCLUDE MAPPED<br \/>\nUSERID system, PASSWORD oracle<br \/>\nDISCARDFILE .\/dirrpt\/repl_ss.dsc, PURGE<br \/>\nMAP gg.*, TARGET gg.*;<\/p>\n<p>\u51b2\u7a81\u7684\u73b0\u8c61<br \/>\n1.\u63d2\u5165\u65f6\u4e3b\u952e\u51b2\u7a81<br \/>\n2.\u66f4\u65b0\/\u5220\u9664\u51b2\u7a81<\/p>\n<p>\u89e3\u51b3\u7684\u529e\u6cd5\uff1a<br \/>\n1.\u8bfb\u5199\u5206\u79bb<br \/>\n2.\u8bbe\u7f6e\u5f88\u5c0f\u7684\u5ef6\u8fdf,A\u64cd\u4f5c\u7684\u66f4\u6539\u5728B\u64cd\u4f5c\u7684\u66f4\u6539\u5b8c\u6210\u4e4b\u524d\u53cd\u5e94\u5230B\u7684\u8bdd\u5c31\u907f\u514d\u4e86\u51b2\u7a81;<\/p>\n<p>\u4f7f\u7528gg\u7684CDR(Conflict Detection and Resolution)\u7279\u6027<br \/>\n1.\u89e3\u51b3\u63d2\u5165\u65f6\u4e3b\u952e\u51b2\u7a81<br \/>\n2.\u66f4\u65b0\/\u5220\u9664\u65f6\u627e\u4e0d\u5230\u6570\u636e;<\/p>\n<p>\u7ea6\u675f:\u6570\u636e\u5e93\u5fc5\u987b\u5728\u540c\u7c7b\u7684OS\u5e73\u53f0\u4e0a,\u53ea\u652f\u6301\u53ef\u4ee5\u6bd4\u8f83\u800c\u4e14\u662f\u6ca1\u6709\u663e\u5f0f\u8f6c\u6362\u7684\u6570\u636e\u7c7b\u578b<br \/>\n<\/user><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.truncate\u64cd\u4f5c\u8981\u5355\u72ec\u5904\u7406,\u5728EXTRACT\u548cREPLICAT\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0GETTRUNCATES; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1420","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1420"}],"version-history":[{"count":1,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1420\/revisions"}],"predecessor-version":[{"id":1421,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1420\/revisions\/1421"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1420"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}