{"id":1414,"date":"2018-05-15T10:17:14","date_gmt":"2018-05-15T02:17:14","guid":{"rendered":"http:\/\/www.royalwzy.com\/?p=1414"},"modified":"2018-05-15T10:17:14","modified_gmt":"2018-05-15T02:17:14","slug":"goldengate%e5%ad%a6%e4%b9%a04-oracle-to-oracle-workshop-demonstration","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=1414","title":{"rendered":"GoldenGate\u5b66\u4e604&#8211;Oracle to Oracle workshop demonstration"},"content":{"rendered":"<p>GoldenGate for Oracle to Oracle<br \/>\n1. Environments;<br \/>\n    1. Source Database:<br \/>\n        1. Oracle:11g R2;<br \/>\n        2. Ip Address:192.168.10.11;<br \/>\n        3. Hostname:ggsource.snda.com;<br \/>\n        4. Oracle SID:ggsource;<br \/>\n    2. Target Database:<br \/>\n        1. Oracle:11g R2;<br \/>\n        2. Ip Address:192.168.10.12;<br \/>\n        3. Hostname:ggtarget.snda.com;<br \/>\n        4. Oracle SID:ggtarget.snda.com;<br \/>\n2. Oracle to Oracle configuration;<br \/>\n3. Prepare the Environment;<br \/>\n    1. Description:<br \/>\n        1. The GoldenGate software must be installed on both the source and target systems;<br \/>\n        2. The installation includes a sample database and scripts to generate initial data as well as subsequent update operations;<br \/>\n        3. The source and target tables are created and loaded with initial data;<br \/>\n        4. the GoldenGate Manager processes are also started so that other processes may be configured and started;<br \/>\n    2. \u51c6\u5907\u6d4b\u8bd5\u6570\u636e:<br \/>\n        1. \u5206\u522b\u5728\u6e90\u6570\u636e\u5e93\u548c\u76ee\u6807\u6570\u636e\u5e93\u521b\u5efagg\u7528\u6237,\u5e76\u8d4b\u4e88\u4e00\u5b9a\u7684\u6743\u9650:create user gg identified by gg default tablespace example;grant connect, resource to gg;(\u4e00\u5b9a\u8981\u4fdd\u8bc1\u8868\u662flogging\u7684,select table_name, tablespace_name, logging, owner from dba_tables where owner=&#8217;GG&#8217;;)<br \/>\n        2. \u5206\u522b\u5728\u6e90\u6570\u636e\u5e93\u548c\u76ee\u6807\u6570\u636e\u5e93\u7684gg\u7528\u6237\u4e0b\u521b\u5efa\u6d4b\u8bd5\u4f7f\u7528\u7684\u8868(\u811a\u672c\u662fGoldenGate\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684demo_ora_create.sql\u6587\u4ef6);<br \/>\n        3. \u53ea\u5728\u6e90\u6570\u636e\u5e93\u7684\u6d4b\u8bd5\u8868\u4e2d\u6dfb\u52a0\u6d4b\u8bd5\u6570\u636e(\u811a\u672c\u662fGoldenGate\u76ee\u5f55\u4e0b\u7684demo_ora_insert.sql\u6587\u4ef6);<br \/>\n    3. Configure the Manager process on the source and target:<br \/>\n        1. Create the Manager parameter file;<br \/>\n        2. Use edit to assign a port(7809 default),\u5176\u5b9e\u662f\u7f16\u8f91\u4e86\/gg11\/dirprm\/mgr.prm\u6587\u4ef6;<br \/>\n        3. Start the Manager and View the Manager process;<br \/>\n        4. \u67e5\u770b\u540e\u53f0\u8fdb\u7a0b\u9a8c\u8bc1:ps -ef | grep mgr;<br \/>\n        5. \u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6(\/gg11\/dirrpt\/MGR.rpt\u6587\u4ef6)\u6216\u8005\u4f7f\u7528view report mgr\u547d\u4ee4\u67e5\u770bManager\u7684\u65e5\u5fd7;<br \/>\n    4. Supplemental Logging:<br \/>\n        1. Add database level supplmental logging on source and target:done when GoldenGate installed;<br \/>\n        2. Add table level supplemental logging on srouce and target;<br \/>\n        3. Verify that supplemental logging infos;<br \/>\n4. Configure Initial Data Load;<br \/>\n    1. Initial Load Methods:<br \/>\n        1. Oracle GoldenGate Methods;<br \/>\n        2. Database-specific Methods:<br \/>\n            1. Backup\/Restore;<br \/>\n            2. Export\/Import;<br \/>\n            3. SQL scripts;<br \/>\n            4. Break mirror;<br \/>\n            5. Transportable tablespaces;<br \/>\n            6. Note:<br \/>\n                1. Run a test initial load early on for timing and sizing;<br \/>\n                2. Run the actual initial load after starting change capture on the source;<br \/>\n        3. Current use;<br \/>\n    2. Initial data capture:<br \/>\n        1. add the initial load capture batch task group:GGSCI> add extract eint<unique id>, sourceistable;(sourceistable \u53c2\u6570\u4ee3\u8868\u8fd9\u662finitial data);<br \/>\n        2. configure the initial load capture parameter file:GGSCI> edit params eint<\/unique><unique id>;<br \/>\n    3. Initial data delivery:<br \/>\n        1. add the initial load delivery batch task:GGSCI>add replicat rini<\/unique><unique id>, specialrun;(specialrun:Create a Replicat special run as a task)<br \/>\n        2. configure the initial load delivery parameter file;(assumetargetdefs:\u5047\u5b9a\u76ee\u6807\u6570\u636e\u5e93\u548c\u6e90\u6570\u636e\u5e93\u8868\u7ed3\u6784\u4e00\u81f4;discardfile:\u5931\u8d25\u7684\u8bb0\u5f55\u8bb0\u5f55\u7684\u6587\u4ef6;)<br \/>\n    4. Execute the initial load process:<br \/>\n        1. start extract process:start extract eint<\/unique><unique id>;<br \/>\n        2. view the results on the target system:view report rini<\/unique><unique id>;<br \/>\n        3. \u5728\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u67e5\u770b\u6570\u636e;<br \/>\n5. Configure Change Capture(online mode);<br \/>\n    1. Extract can be configured to:<br \/>\n        1. Capture changed data from database logs;<br \/>\n        2. Capture data directly from source tables for initial data load;<br \/>\n        3. Write the data to a local or remote trail or file;<br \/>\n    2. add the extract group:add extract eora<\/unique><unique id>, tranlog, begin now, threads <instances>;<br \/>\n    3. create the extract parameter file;<br \/>\n    4. define the GoldenGate trail:add rmttrail .\/dirdat\/<trail id>, extract eora<unique id>, megabytes 5;(default 10M size)<br \/>\n    5. start the capture process:start extract eora<\/unique><unique id>;<br \/>\n    6. \u53ef\u4ee5\u901a\u8fc7view report eorasd\u67e5\u770b\u65e5\u5fd7;<br \/>\n6. Configure Change Delivery;<br \/>\n    1. set up the checkpoint table;<br \/>\n        1. create a GLOBALS file on the target system;(exit and save)<br \/>\n        2. activate the GLOBALS parameters;<br \/>\n    2. Configure Change Delivery;<br \/>\n        1. add the replicat group;<br \/>\n        2. create replicat parameter file;<br \/>\n        3. start the replicat process;<br \/>\n7. Generate Activity and Verify the Results;<br \/>\n    1. exceute miscellaneous update, insert and delete operations on source system;<br \/>\n    2. verify results on the source system;<br \/>\n    3. verify results on the target system;<br \/>\n    4. turn off error handling;<br \/>\n8. Parameter Files Knowlege:<br \/>\n    1. Editing Parameter Files:<br \/>\n        1. Edit parameter files to configure GoldenGate processes;<br \/>\n        2. The GLOBALS parameter file is identified by its file path:GGSCI>edit params .\/GLOBALS;<br \/>\n        3. Manager and utility parameter files are identified by keywords:GGSCI>edit params mgr\/defgen;<br \/>\n        4. Extract and Replicat parameter files are identified by the process groiup name:GGSCI>edit params <group name>;<br \/>\n    2. GLOBALS Versus Process Parameters:<br \/>\n        1. GLOBALS parameter apply to all processes:<br \/>\n            1. set when Manager starts;<br \/>\n            2. reside in <goldengate install directory>\/GOLBALS;<br \/>\n        2. Process parameters apply to a specific process(Manager, Extract, Server Collector, Replicat, Utilities):<br \/>\n            1. set when the process starts;<br \/>\n            2. override GOLBALS settings;<br \/>\n            3. reside by defaults in the dirprm directory in files named <process name>.prm;<br \/>\n            4. most apply to all tables processed but some can be specified at the table level;<br \/>\n    3.<br \/>\nGLOBALS Parameters:<br \/>\n        1. Control things common to all processes in a GoldenGate instance;<br \/>\n        2. Can be overridden by parameters at the process level;<br \/>\n        3. Must be created before any processes are started;<br \/>\n        4. Must exit GGSCI to save;<br \/>\n        5. Once set, rarely changed;<br \/>\n        6. MGRSERVNAME:defines a unique Manager service name;<br \/>\n        7. CHECKPOINTTABLE:Defines the table name used for Replicat&#8217;s checkpoint table;<\/process><\/goldengate><\/group><\/unique><\/trail><\/instances><\/unique><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GoldenGate for Oracle to Oracle 1. Environments; 1. Sou [&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-1414","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1414","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=1414"}],"version-history":[{"count":1,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1414\/revisions"}],"predecessor-version":[{"id":1415,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/1414\/revisions\/1415"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1414"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}