220 likes | 352 Views
GoldenGate Administration. Lorena Lobato Pardavila - CERN. Outline. Replication Technology Evolution for ATLAS Data Workshop. GoldenGate installation and integration with RAC GoldenGate processes management Data Instantiation Questions. Outline.
E N D
GoldenGate Administration Lorena Lobato Pardavila - CERN Replication Technology Evolution for ATLAS Data Workshop
Outline Replication Technology Evolution for ATLAS Data Workshop GoldenGate installation and integration with RAC GoldenGate processes management Data Instantiation Questions
Outline Replication Technology Evolution for ATLAS Data Workshop GoldenGate installation and integration with RAC GoldenGate processes management Data Instantiation Questions
GoldenGate Overview Replication Technology Evolution for ATLAS Data Workshop • Most Oracle GoldenGate functionality is controlled by means of parameters specified in parameter files • OGG uses two types of parameter files: GLOBALS file and runtime parameter files • Database Configuration • Database running in ARCHIVELOG mode • Enable FORCE LOGGING • Create supplemental log groups required for conflict detection • Configure the Streams Pool • Install the UTL_SPADV package (Optional)
GoldenGate Overview MANAGER EXTRACT GGSCI GLOBALS DATA PUMP REPLICAT Replication Technology Evolution for ATLAS Data Workshop • Key GoldenGate configuration • Enable supplemental log groups to ensure conflict detection • Recommended to use integrated capture mode Extract to take advantage of the integration with the log miner server • Configure multiple parallel Replicat processes using batched SQL for higher apply performance
GLOBALS file GGSCI > add checkpointtable GGADMIN.CKPTAB Replication Technology Evolution for ATLAS Data Workshop -- Specifies a default checkpoint table CHECKPOINTTABLE <owner.tablename> -- Enable to be monitored by OEM or OGG Monitor (Optional) ENABLEMONITORING -- Specifies the name of the schema that contains the database objects that support DDL synchronization for Oracle GGSCHEMA <schema_name>
Parameter file:Manager Replication Technology Evolution for ATLAS Data Workshop PORT <port number> PURGEOLDEXTRACTS <path to the trail file>, USECHECKPOINTS, MINKEEPHOURS <"x" hours>, MINKEEPFILES <"y" number of files> AUTORESTART EXTRACT *, RETRIES <x>, WAITMINUTES <y>, RESETMINUTES <z> LAGREPORTMINUTES <x> LAGCRITICALMINUTES <y>
Parameter file:Extract Replication Technology Evolution for ATLAS Data Workshop EXTRACT <Extract name> SETENV (ORACLE_HOME = "<Oracle home path>”) USERIDALIAS <username>@<dbtns> EXTTRAIL <extract trail path/two character trail id> REPORTCOUNT EVERY <n> MINUTES, RATE TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size<n>, parallelism <n>) DDL INCLUDE ALL, EXCLUDE OBJNAME "<schema name>.<object name>" DDLOPTIONS ADDTRANDATA Table <source schema name>.<table name>;
Parameter file:Data Pump Replication Technology Evolution for ATLAS Data Workshop EXTRACT <Pump name> PASSTHRU RMTHOST <Remote hostname>, MGRPORT <Target manager port number>, TCPBUFSIZE <n>, TCPFLUSHBYTES <n>,COMPRESS RMTTRAIL <extract trail path/two character trail id> DISCARDFILE <diacard file path/<discard file name.dsc>, APPEND Megabytes <n> DISCARDROLLOVER AT <hh:mi> on <day of the week> REPORTCOUNT EVERY <n> HOURS, RATE Table <source schema name>.<table name>;
Data Pump: TCP parameters • TCPBUFSIZE and TCPFLUSHBYTES very useful for increasing the buffer sizes and network packets sent by data pump over the Wide Area Network • To determine suitable value, the TCPBUFSIZE and TCPFLUSHBYTES should be equal to BDP = Bandwidth * RoundTimeTripbetween source and destination • Several tests executed and no significant changes observed except for compress data as expected • Oracle recommeds to size OS TCP kernel parameters to higher than the value chosen for the GoldenGate TCP parameters above mentioned • net.core.rmen_max • net.core.wmen_max • net.ipv4.tcp_rmem • net.ipv4.tcp_wmem • net.ipv4.tcp_window_scaling = 1 Replication Technology Evolution for ATLAS Data Workshop
Parameter file:Replicat Replication Technology Evolution for ATLAS Data Workshop REPLICAT <Replicat name> SETENV (ORACLE_HOME = "<Oracle home path>") USERIDALIAS <username>@<dbtns> ASSUMETARGETDEFS DBOPTIONS INTEGRATEDPARAMS(PARALLELISM 4) DISCARDFILE <path discard file name.dsc>, APPEND Megabytes <n> DDL INCLUDE ALL, EXCLUDE/INCLUDE OBJNAME "<schema name>.<object name>" DDLOPTIONS REPORT BATCHSQL REPORTCOUNT EVERY <n> HOURS, RATE MAP <source schema name>.<table name>, TARGET <target schema name>.<tablename>;
Creation/Running GoldenGate processes SOURCE Data Pump GGSCI> add extract <extract_name> , exttrailsource<trail_path / xx> GGSCI> add rmttrail<remote_trail_path/yy> ,extract <extract_name> ,megabytes <n> GGSCI> start extract <extract _name> UKOUG 2013 Manager GGSCI> start mgr Credentials GGSCI> ADD CREDENTIALSTORE GGSCI> ADD CREDENTIALSTORE add user <user_alias>@<dbtns> Extract GGSCI> dbloginuseridalias<user_alias>@<dbtns> GGSCI> add extract <extract_name> , integrated tranlog, begin now GGSCI> add exttrail<trail_path/xx>, extract <extract _name> , megabytes <n> GGSCI> register extract <extract_name> database GGSCI> start extract <extract_name>
Creation/Running GoldenGate processes TARGET UKOUG 2013 Manager GGSCI> start mgr Credentials GGSCI> ADD CREDENTIALSTORE GGSCI> ADD CREDENTIALSTORE add user < user_alias >@<dbtns> Replicat GGSCI> dbloginuseridalias <user_alias>@<dbtns> GGSCI> add replicat<replicat_name> integrated, exttrail <remote_trail_path/yy> GGSCI> register replicat<replicat_name> database GGSCI> start replicat<replicat_name> And to edit parameter files… GGSCI> edit params<process_name> GGSCI> send <extract/replicat> <process_name>, <parameter>
Info processes UKOUG 2013 • Info all • Stats <process_name> • View report <process_name> • View params<process_name>
Outline Replication Technology Evolution for ATLAS Data Workshop GoldenGate installation and integration with RAC GoldenGate processes management Data Instantiation Network performance tuning for GoldenGate Questions
Data instantiation Replication Technology Evolution for ATLAS Data Workshop • Process of getting source and replica data in sync • It is not trivial for a data being updated continuously • Two scenarios • Configuring a new replication • Adding schema(s) to an active configuration
Replication creation Start Replicat with HANDLECOLLISIONS parameter START MGR Start Extract, DataPump Extract , DataPump, Replicat creation Remove HANDLECOLLISIONS COPY (expdp/impdp) COLLISION TIME Replication Technology Evolution for ATLAS Data Workshop
Adding schema to active replication Start Replicat with HANDLECOLLISIONS parameter Add schema to Extract and DataPump and Replicat process Stop replicat Remove HANDLECOLLISIONS COPY (expdp/impdp) COLLISION TIME Replication Technology Evolution for ATLAS Data Workshop
Outline Replication Technology Evolution for ATLAS Data Workshop GoldenGate installation and integration with RAC GoldenGate processes management Data Instantiation Questions
THANK YOU! lorena.lobato@cern.ch Replication Technology Evolution for ATLAS Data Workshop