You are on page 1of 46
Day 5 AGENDA + Goldengate Initial load . + Zero Downtime Upgradation and migration Strategy using Goldengate. + Data Filteration and Transformation + Data manipulation + COLMAP Clause DML replication using GoldenGate DML Replication using Goldengate follows the below tasks: Create a GoldenGate Checkpoint table Create an Extract group Create a parameter file for the online Extract group Create a Trail Create a Replicat group Create a parameter file for the online Replicat group. Refer to Document provided. Using Obey File Using Obey Files + You can use an Obey file to perform a reusable sequence of commands Save the commands in a text file, for example: * Then use the GGSCI OBEY command to run the file: GGSCI> OBEY .oby Note. An Obey file can have any file extension or none. Save below commands in obey file to run at once: START MGR ADD EXTRACT myext, TRANLOG, BEGIN NOW ADD EXTTRAIL /ggs/dirdat/rt, EXTRACT myext START EXTRACT myext Initial Load GoldenGate Initial Load Advantages of using Goldengate Initial Load: + Work across heterogeneous database types and platforms. No application downtime required Read directly from source tables, without locking tables. Fetch data in arrays to speed performance Parallel processing using WHERE clauses or RANGE function. Distribute data over multiple network controllers. Flexible load alternatives, including native bulk load utilities. GoldenGate change delivery can handle collisions with initial Oracle GoldenGate - Components Trails + Trails are series of files that GoldenGate temporarily stores on disks and these files are written to and read from by the Extract and Replicat processes as the case may be. + Depending on the configuration chosen, these trail files can exist on the source as well as on the target systems. If it exists on the local system, it will be known an Extract Trail or as an Remote Trail if it exists on the target system. * These are platform independent. Data Pumps + Data Pumps are secondary extract mechanisms. + This is optional component. Oracle GoldenGate —- Components Different components and processes that make up a typical Goldengate Configuration: + Manager > Extract + Replicat * Data Pump * Trail Files * Collector Datasource for inital load: ‘source tables 7 wnat LoaD ranoet 00 SB O-. aS Datasource for Traitor fle ‘change synchronization: ‘ansaction log or vendor access module rr CHANGE SYNCHRONIZATION me 1 Tame ta tans asa Oracle GoldenGate 19¢ Initial Load (eso on me 1 Tama a tans asa PREREGUSTE me 1 Tama ta tans asa Oracle GoldenGate - Components Different components and processes that make up a typical Goldengate Configuration: Manager Extract Replicat Data Pump Trail Files Collector —I- ae = @®. aaa (Wenase) enange synchronization transaction tog or (Optional) Extract- Change Capture 1. Prepare the Environment 3. Initial Lead (various methods) \. Target \ Database Transaction (_ 2. Change Capture 4. Change Delivery Replicat - Change Delivery 1. Prepare the Environment Source Database ————— 3 Initia! Load (various methods). + Target \ sce we Transection _2.Change Capture TaoetTit— 4, Change Delivery Logs 7 - Zero dowmtine upgradation and migration strategy’ Data Filtration And Transformation GoldenGate Data Selection - Overview + GoldenGate provides the ability to select or filter out data based on a variety of levels and conditions me Stolle) TABLE or MAP Table WHERE Row FILTER Row, Operation, Range TABLE COLS | COLSEXCEPT Columns Data Selection-Where Clause The WHERE clause is the simplest form of selection: * WHERE clause appears on either the MAP or TABLE parameter and must be surrounded by parenthesis. WHERE clause cannot: * perform arithmetic operations * refer to trail header and user token values * You can Use the FILTER clause for more complex selections with built-in functions “ Sse MOREE 1, Ak anc TAG LATA ALA t4st Oracle GoldenGate 19¢ Data Filtratidn using GOLDENGATE WHERE CLAUSE Data Selection-Where Clause Examples: Only rows where the state column has a value of CA are returned. WHERE (STATE = “CA”); * Only rows where the amount column has a value of NULL. Note that if amount was not part of the update, the result is false. WHERE (AMOUNT = @NULL); * Only rows where the amount was part of the operation and it has value that is not null. WHERE (AMOUNT @PRESENT AND AMOUNT <> @NULL); * Only rows where the account identifier is greater than CORP- ABC. WHERE (ACCOUNT_ID > “CORP-ABC”); Selection-Filter Clause The FILTER clause provides complex evaluations to include or exclude data selection: « FILTER clause appears on either the MAP or TABLE parameter and must be surrounded by parenthesis. With FILTER you can: « Deploy other GoldenGate built-in functions. « Use multiple FILTERs on one statement. If any filter fails, the entire filter clause fails. « Include multiple option clauses, for example (on insert/ update). rn me Oe 1S [ences aumcid ARMM AaRbC AaBbC 10% cin FIND- F ga J I TRUP- Converts all to aDATE i : t tim @STREQ Str4=STR2 1 C16 @STREQ Str1=STR2 —1 Str1<>STR2 --0 AalIbG Aabts AabbC 0% Selection-Filter Clause Syntax FILTER (

You might also like