{"id":1493,"date":"2010-07-14T14:56:06","date_gmt":"2010-07-14T19:56:06","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1493"},"modified":"2011-02-16T11:15:50","modified_gmt":"2011-02-16T16:15:50","slug":"data-synchronization-with-oracle-goldengate","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1493","title":{"rendered":"Data Synchronization with Oracle GoldenGate"},"content":{"rendered":"<span id=\"GoldenGate_Overview\"><h2>GoldenGate Overview<\/h2><\/span>\n<p>* GoldenGate is a software platform that enables exchange and manipulation of data at the <strong>transaction level<\/strong> among multiple, heterogeneous platforms across the enterprise.<br \/>\n* Supports multiple OS platforms (Solaris, Linux, HP, Win) and databases (Oracle, DB2, MySql to name a few). <\/p>\n<span id=\"Supported_Topologies\"><h3>Supported Topologies<\/h3><\/span>\n<p>* Unidirectional: Reporting instance<br \/>\n* Bi-directional: Instant failover &#8220;Active-Active&#8221;<br \/>\n* Peer-to-peer: Load balancing, HA<br \/>\n* Broadcast: Data distribution<br \/>\n* Consolidation: Dataware house\/mart\/store<br \/>\n* Cascading: Scalability, DB tiering<\/p>\n<span id=\"Components\"><h2>Components<\/h2><\/span>\n<p>* Extract<br \/>\n* Data dump<br \/>\n* Replicat<br \/>\n* Trails or extract files<br \/>\n* Checkpoints<br \/>\n* Manager<br \/>\n* Collector<\/p>\n<span id=\"Extract_Process\"><h2>Extract Process<\/h2><\/span>\n<p>* Runs on source system.<br \/>\n* Provides data capture mechanism:<br \/>\n&#8211; Captures all changes that are made to objects configured for synchronization.<br \/>\n&#8211; Sends only committed transactions to the trail for propagation to the target system.<br \/>\n* Multiple Extract processes can operate on different objects at the same time.<br \/>\n* Can be configured for<br \/>\n&#8211; Initial loads<br \/>\n&#8211; Change synchronization<\/p>\n<span id=\"Extraction_Types\"><h3>Extraction Types<\/h3><\/span>\n<p>* Log-based Extraction:<br \/>\n&#8211; Extract component obtains data from database transaction logs such as Oracle redo logs.<br \/>\n* VAM-based Extraction:<br \/>\n&#8211; VAM stands for Vendor Access Module. It is a communication layer that passes data changes and transaction metadata to the Extract process.<br \/>\n&#8211; Database vendor provides VAM to extract data changes and pass it to Extract.<\/p>\n<span id=\"Data_Pump\"><h3>Data Pump<\/h3><\/span>\n<p>* A data pump is a secondary Extract group within the source GoldenGate configuration.<br \/>\n* A data pump reads source system local trail and sends the data across the network to a remote trail on the target.<br \/>\n* Benefits:<br \/>\n&#8211; Adds storage flexibility<br \/>\n&#8211; Isolate primary Extract process from TCP\/IP activity.<br \/>\n* Can be configured for:<br \/>\n&#8211; Online processing.<br \/>\n&#8211; Batch processing.<br \/>\n&#8211; Pass-through mode.<br \/>\n&#8211; To perform data filtering, mapping, and conversion.<\/p>\n<span id=\"Replicat_Process\"><h2>Replicat Process<\/h2><\/span>\n<p>* Runs on target system.<br \/>\n* Reads extracted data changes that are specified in Replicat configuration<br \/>\n* Replicates data changes to target database in the same order as source db.<br \/>\n* Can be configured in<br \/>\n&#8211; Initial loads<br \/>\n&#8211; Change synchronization<\/p>\n<span id=\"Replicat_Configurations\"><h3>Replicat Configurations<\/h3><\/span>\n<p>* Initial loads<br \/>\n* Change synchronization<\/p>\n<span id=\"Trail_Files\"><h2>Trail Files<\/h2><\/span>\n<p>* A trail file temporarily stores data changes on local disk (local trail) or remote disk (remote trail).<br \/>\n* Trail files are generated by Extract process.<br \/>\n* Trail files are read by Data Pump and Replicat processes.<br \/>\n* Data is read\/write in large blocks to improve I\/O.<br \/>\n* Uses universal data format.<br \/>\n&#8211; File header record (Version 10.0 and after): contains info about trail file itself.<br \/>\n&#8211; Header area: contains info about transaction environment.<br \/>\n&#8211; Data area: contains actual data being extracted.<\/p>\n<span id=\"Trail_File_Writing_Mode\"><h3>Trail File Writing Mode<\/h3><\/span>\n<p>* Append mode (Version 10.0 and after)<br \/>\n* Overwrite mode<\/p>\n<span id=\"Trail_File_Maintenance\"><h3>Trail File Maintenance<\/h3><\/span>\n<p>* Default file size: 10 MB<br \/>\n* File name format: same two characters followed by a unique, six-digit serial number (000000 &#8211; 999999). For example, &#8216;tr000001&#8217;.<br \/>\n* Default storage directory: &#8216;dirdat&#8217;.<\/p>\n<span id=\"Extract_Files\"><h2>Extract Files<\/h2><\/span>\n<p>* Similar to trail files but without checkpoints.<br \/>\n* Used for one-time runs such as initial loads and batch processing.<\/p>\n<span id=\"Checkpoints\"><h2>Checkpoints<\/h2><\/span>\n<p>* Store the current read\/write positions of a process to disk for recovery purposes.<br \/>\n* Prevent redundant processing.<br \/>\n* Provide fault tolerance against system, network, and GoldenGate process crashes.<br \/>\n* Read checkpoints are always synchronized with write checkpoints.<br \/>\n* Maintained by checkpoint files in the &#8216;dirchk&#8217; sub-directory.<\/p>\n<span id=\"Managers\"><h2>Managers<\/h2><\/span>\n<p>* Monitor\/restart GG processes.<br \/>\n* Issue threshold reports.<br \/>\n* Maintain trail files and logs.<br \/>\n* Allocate data storage space.<br \/>\n* Report errors and events.<br \/>\n* Receive and route user requests from user interface.<\/p>\n<span id=\"Collector\"><h2>Collector<\/h2><\/span>\n<p>* Background process runs in the target system.<br \/>\n* Accepts extracted db changes that are sent over the TCP\/IP network and writes them to trail\/extract files.<br \/>\n* Dynamic collectors:<br \/>\n&#8211; Started by Manager.<br \/>\n&#8211; One Extract per dynamic collector.<br \/>\n* Static collectors:<br \/>\n&#8211; Started manually.<br \/>\n&#8211; Multiple Extract processes can share one static collector (one to one preferred).<\/p>\n<span id=\"ExtractCollector_Pair\"><h3>Extract\/Collector Pair<\/h3><\/span>\n<p>* Collector process stops when Extract stops.<br \/>\n* Normally, Extract initiates Collector processes. But Collector can be configured to initiate Extract.<\/p>\n<span id=\"Processing_Modes\"><h2>Processing Modes<\/h2><\/span>\n<span id=\"Online_process\"><h3>Online process<\/h3><\/span>\n<p>* Runs continuously until stopped by a user<br \/>\n* Maintains recovery checkpoints in the trail<br \/>\n&#8211; Processing can resume after interruptions<br \/>\n* Used to continuously extract and replicate transactional\/DDL changes<\/p>\n<span id=\"A_Batch_Run\"><h3>A Batch Run<\/h3><\/span>\n<p>* Aka, Special Run<br \/>\n* Extracts or replicates changes within known begin and end points<br \/>\n* No checkpoints maintained (rerun if failures)<\/p>\n<span id=\"A_Task\"><h3>A Task<\/h3><\/span>\n<p>* A special type of batch run.<br \/>\n* Used for certain initial load methods.<br \/>\n* Extract communicates <strong>directly <\/strong>with Replicat over TCP\/IP.<\/p>\n<span id=\"Groups\"><h2>Groups<\/h2><\/span>\n<span id=\"Processing_Group\"><h3>Processing Group<\/h3><\/span>\n<p>* A process (either Extract or Replicat)<br \/>\n* Process parameter file<br \/>\n* Checkpoint file<br \/>\n* Any other files associated with the process<\/p>\n<span id=\"Group_Names\"><h3>Group Names<\/h3><\/span>\n<p>* Eight characters long following OS file name conventions.<br \/>\n* Case *insensitive*<br \/>\n* Do *not* end in numbers (can begin with numbers)<\/p>\n<span id=\"Commit_Sequence_Number_or_CSN\"><h2>Commit Sequence Number or CSN<\/h2><\/span>\n<p>* Uniquely identifies a particular point in time in which a transaction commits to the database.<br \/>\n* Same as Oracle SCN (System Change Number)<\/p>\n<span id=\"Configure_Manager\"><h2>Configure Manager<\/h2><\/span>\n<pre>\r\nC:\\prog\\gg104>ggsci\r\n\r\nOracle GoldenGate Command Interpreter for Oracle\r\nVersion 10.4.0.19 Build 002\r\nWindows (optimized), Oracle 10 on Sep 18 2009 15:54:55\r\n\r\nCopyright (C) 1995, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nGGSCI (USRES-MING-LJ2) 1> edit params mgr\r\n\r\nGGSCI (USRES-MING-LJ2) 6> start manager\r\nManager started.\r\n\r\nGGSCI (USRES-MING-LJ2) 7> stop manager\r\nManager is already stopped.\r\n<\/pre>\n<span id=\"mgr.prm\"><h3>mgr.prm<\/h3><\/span>\n<pre>\r\nPORT 7809\r\nPURGEOLDEXTRACTS\r\n<\/pre>\n<span id=\"Global_parameters\"><h3>Global parameters<\/h3><\/span>\n<p>Stored in GLOBALS file<\/p>\n<pre>\r\nGGSCI (USRES-MING-LJ2) 13> EDIT PARAMS .\/GLOBALS\r\n<\/pre>\n<span id=\"Runtime_Parameters\"><h3>Runtime Parameters<\/h3><\/span>\n<p>* Runtime global parameters<br \/>\n* Object specific parameters<\/p>\n<span id=\"Commands\"><h1>Commands<\/h1><\/span>\n<span id=\"Manager_Commands\"><h2>Manager Commands<\/h2><\/span>\n<pre>\r\nGGSCI (USRES-MING-LJ2) 1> info manager\r\nManager is DOWN!\r\n\r\nGGSCI (USRES-MING-LJ2) 2> status manager\r\nManager is DOWN!\r\n\r\nGGSCI (USRES-MING-LJ2) 3> refresh manager\r\nERROR: Manager not currently running.\r\n\r\n<\/pre>\n<span id=\"References\"><h1>References<\/h1><\/span>\n<p>* gg_wux_admin_v104.pdf<br \/>\n* gg_wux_ref_v104.pdf<br \/>\n* <a href=\"http:\/\/gavinsoorma.com\/\">http:\/\/gavinsoorma.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GoldenGate Overview * GoldenGate is a software platform that enables exchange and manipulation of data at the transaction level among multiple, heterogeneous platforms across the enterprise. * Supports multiple OS platforms (Solaris, Linux, HP, Win) and databases (Oracle, DB2, MySql &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1493\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[88],"tags":[],"class_list":["post-1493","post","type-post","status-publish","format-standard","hentry","category-goldengate"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-o5","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1493"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1493\/revisions"}],"predecessor-version":[{"id":1951,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1493\/revisions\/1951"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}