DOAG 2015 Database Data Replication With Oracle GoldenGate Robert Bialek Principal Consultant Partner



Similar documents
SOUG-SIG Data Replication With Oracle GoldenGate Looking Behind The Scenes Robert Bialek Principal Consultant Partner

Oracle Data Integration Solutions GoldenGate New Features Summary

Oracle GoldenGate on Disaster Recovery

Oracle GoldenGate. Tutorial for Oracle to Oracle Version July 2013

Oracle Failover Database Cluster with Grid Infrastructure 12c Release 1

Oracle GoldenGate 12c Release 1 New Features Overview O R A C L E W H I T E P A P E R N O V E M B E R

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Implement Streams Release 2. 5 Jours [35 Heures]

Informatica Data Replication FAQs

Oracle Audit in a Nutshell - Database Audit but how?

Oracle Database 12c: New Features for Administrators

Evolution of Database Replication Technologies for WLCG

Oracle Data Guard Fast Start Failover understood!

Oracle Database 11g R1 & R2: New Features for Administrators

Secure Test Data Management with ORACLE Data Masking

Oracle Database Public Cloud Services

Oracle Public Cloud. Peter Schmidt Principal Sales Consultant Oracle Deutschland BV & CO KG

How to Migrate your Database to Oracle Exadata. Noam Cohen, Oracle DB Consultant, E&M Computing

ORACLE DATABASE 12C: NEW FEATURES FOR ADMINISTRATORS GRADE CURRICULAR. Enterprise Manager Express home page versus Enterprise Manager Database Control

Oracle Software. Hardware. Training. Consulting. Mythics Complete.

Cloud aber Sicher. Florian van Keulen. Senior Consultant Cloud & Security

Maximize Availability With Oracle Database 12c

Pluggable Databases : What they will break and why you should use them anyway!

Oracle GoldenGate SQL Server Installation and Setup Guide 11g Release 2 Patch Set 1 ( ) E April 2012

GoldenGate for DB2 on zos

<Insert Picture Here> Operational Reporting for Oracle Applications with Oracle GoldenGate

OWB Users, Enter The New ODI World

Shadowbase Data Replication Solutions. William Holenstein Senior Manager of Product Delivery Shadowbase Products Group

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

Module 14: Scalability and High Availability

Oracle: Database and Data Management Innovations with CERN Public Day

How to Implement Multi-way Active/Active Replication SIMPLY

An Oracle White Paper Updated August Oracle GoldenGate for Linux, UNIX, and Windows

How To Ensure Data Security On Anor

Oracle 1Z0-528 Exam Questions & Answers

Dbvisit Replicate. Dbvisit Replicate Overview

Copyright 2014 Oracle and/or its affiliates. All rights reserved.

Real-time Data Replication

Securing Data in Oracle Database 12c

Oracle Database 10g: New Features for Administrators

The safer, easier way to help you pass any IT exams. Exam : 1Z Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

Oracle Database 12c Plug In. Switch On. Get SMART.

Inge Os Sales Consulting Manager Oracle Norway

Database Security Questions HOUG Fehér Lajos. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Microsoft Azure. IaaS Networking Storage. Stefan Geiger Gerry

Oracle Audit Vault Oracle FLEXCUBE Universal Banking Release [April] [2014]

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

About the Author About the Technical Contributors About the Technical Reviewers Acknowledgments. How to Use This Book

Exadata Database Machine Administration Workshop NEW

SQL Server Training Course Content

Applying traditional DBA skills to Oracle Exadata. Marc Fielding March 2013

ORACLE DATABASE 12c FOR SAP: ROADMAP, BASE CERTIFICATION FEATURES AND OPTIONS

Oracle Database - Engineered for Innovation. Sedat Zencirci Teknoloji Satış Danışmanlığı Direktörü Türkiye ve Orta Asya

Modern PL/SQL Code Checking and Dependency Analysis

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

Oracle Database Cloud Services OGh DBA & Middleware Day

GoldenGate for MS SQL Server 2008 to Oracle

Safe Harbor Statement

How To Test For A Test On A Test Server

<Insert Picture Here> Playing in the Same Sandbox: MySQL and Oracle

An Oracle White Paper March Best Practices for Real-Time Data Warehousing

Oracle GoldenGate SQL Server Installation and Setup Guide 11g Release 1 Patch Set 1 ( ) E April 2011

Exadata and Database Machine Administration Seminar

Solution for Staging Area in Near Real-Time DWH Efficient in Refresh and Easy to Operate. Technical White Paper

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Course Outline: Course 6317: Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills

Active-Active and High Availability

Oracle Database 12c: Administration Workshop NEW

High Availability Infrastructure for Cloud Computing

An Oracle White Paper June 11, Oracle Communications Billing and Revenue Management MAA on Oracle Engineered Systems

Oracle vs. SQL Server. Simon Pane & Steve Recsky First4 Database Partners Inc. September 20, 2012

Oracle Cloud Storage and File system

Why Standardize on Oracle Database 11g Next Generation Database Management. Thomas Kyte

Management Packs for Database

Using TimesTen between your Application and Oracle. between your Application and Oracle. DOAG Conference 2011

An Oracle White Paper February Oracle Data Integrator 12c Architecture Overview

Best Approaches to Database Auditing: Strengths and Weaknesses.

Disaster Recovery for Oracle Database

Introducing Oracle Data Integrator and Oracle GoldenGate Marco Ragogna

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW

MS SQL Server 2014 New Features and Database Administration

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Rob Zoeteweij CUSTOMER CASE CONFIGURATION MANAGEMENT PROVISIONING & AUTOMATED PATCHING

Mind Q Systems Private Limited

How To Use Exadata

Data Integration Overview

Oracle Database 12c: Administration Workshop NEW. Duration: 5 Days. What you will learn

Maximum Availability Architecture

An Oracle White Paper July Oracle ACFS

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

2009 Oracle Corporation 1

Online Transaction Processing in SQL Server 2008

Top 10 Performance Tips for OBI-EE

High Availability Solutions for the MariaDB and MySQL Database

INTRODUCTION ADVANTAGES OF RUNNING ORACLE 11G ON WINDOWS. Edward Whalen, Performance Tuning Corporation

<Insert Picture Here> Real-Time Data Integration for BI and Data Warehousing

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Transcription:

DOAG 2015 Database Data Replication With Oracle GoldenGate Robert Bialek Principal Consultant Partner BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH

Who Am I Principal Consultant, Partner and Trainer at Trivadis GmbH in Munich robert.bialek@trivadis.com Focus: Oracle Database High Availability Database Architecture/Internals Backup/Recovery Troubleshooting/Performance Tuning Linux Administration Trainer for the following Trivadis courses Oracle Grid Infrastructure (O-GRINF) Oracle Real Application Cluster (O-RAC) Oracle Data Guard (O-DG) 2 16.06.2015 Data Replication With Oracle GoldenGate

Our company. Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: O P E R A T I O N Trivadis Services takes over the interactive operation of your IT systems. 3 16.06.2015 Data Replication With Oracle GoldenGate

With over 600 specialists and IT experts in your region. COPENHAGEN 14 Trivadis branches and more than 600 employees HAMBURG 200 Service Level Agreements Over 4,000 training participants Research and development budget: CHF 5.0 / EUR 4 million DÜSSELDORF FRANKFURT Financially self-supporting and sustainably profitable Experience from more than 1,900 projects per year at over 800 customers BASEL STUTTGART FREIBURG BRUGG ZURICH MUNICH VIENNA BERN LAUSANNE GENEVA 4 16.06.2015 Data Replication With Oracle GoldenGate

Technology on its own won't help you. You need to know how to use it properly. 5 16.06.2015 Data Replication With Oracle GoldenGate

Agenda 1. Introduction 2. Oracle GoldenGate Architecture 3. Oracle GoldenGate Topologies 4. Oracle GoldenGate Setup 5. Core Messages 6 16.06.2015 Data Replication With Oracle GoldenGate

7 16.06.2015 Data Replication With Oracle GoldenGate Introduction

What is Oracle GoldenGate? Oracle strategic Middleware software product used for data extraction and replication Use-cases: data/service high-availabillity, zero-downtime upgrades/migrations, easy fallback (minimize risk) Supports asynchronous data transfer (DML, DDL) heterogeneous sources and targets (databases, operating systems) different extraction, propagation and apply methods different topologies, mappings, transformations, filtering, error handling, Source as well as the target environment requires a license Includes (EE): Oracle Active Data Guard and Oracle Global Data Services (12.1.0.1+) 8 16.06.2015 Data Replication With Oracle GoldenGate

Why Oracle GoldenGate? Oracle Streams is deprecated in the Oracle 12c version (but still supported!) https://docs.oracle.com/database/121/upgrd/deprecated.htm According to the Oracle GoldenGate Statement of Direction http://www.oracle.com/technetwork/middleware/goldengate/overview/statement-ofdirection-gg-132120.pdf Oracle Streams continues to be supported but will not be enhanced to support any new database features in future releases. This means that Streams will continue to support exactly what it supports today (11.2) in future releases. It also means that any new database features, data types, or capabilities will not be supported by Streams. Beginning with the version 12.1.0.2, the non-cdb architecture is also deprecated As of now, Streams is not supported with the new CDB architecture 9 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate Architecture 10 16.06.2015 Data Replication With Oracle GoldenGate

Optional Oracle GoldenGate Architecture: Big Picture Oracle GoldenGate Instance Oracle GoldenGate Instance Source DB Optional Primary (Passive) Extract Manager (VIP) MONITOR Manager (VIP) MONITOR Optional Primary (Alias) Extract Target DB Primary (Regular) Extract Collector Replicat Local Trail Secondary Extract Data Pump Remote Trail Static Configuration Runtime Configuration Runtime Configuration Static Configuration 11 16.06.2015 Data Replication With Oracle GoldenGate

Primary Extract Group: Capture Source DB Primary Extract can run in either Classic Capture mode (all database versions) Integrated Capture mode (full support: 11.2.0.3+) Primary (Regular) Extract Primary (Passive) Extract Extracts and optionally filters/transforms the transactions from the source database Only for configured objects Many Extracts per source database can operate at the same time Only committed transactions (CSN) will be propagated to the target system (in contrast to Oracle Streams ) Optionally written to a local trail (recommended) Without a local trail, the primary Extract send the data to the target system Not committed transactions will be discarded from memory or dirtmp directory 12 16.06.2015 Data Replication With Oracle GoldenGate

Primary Extract Group: Classic Capture Classic Capture mode Traditional mode, reads directly Oracle database redo logs Able to mine redo logs in ASM (two methods) Redo Logs All database versions supported Source DB With some restrictions. For example no support for: BASIC, OLTP, Exadata Hybrid Columnar compression PDML on RAC database CDB architecture! DDL, TDE support no out-of-the box support Primary Extract OS System Calls Local Trail Secondary Extract Data Pump Not transparent to RAC configuration changes (#threads) 13 16.06.2015 Data Replication With Oracle GoldenGate

Primary Extract Group: Integrated Capture Integrated Capture mode Interacts with the database logmining server Required to capture data from a CDB architecture Fully transparent with RAC, TDE, ASM Full support for databases 11.2.0.3+ Source database 11.2.0.4+ does not require supplementary objects for DDL support Supports more complex data types than classic capture Integrated capture deployments Local or a downstream deployment The best choice for most deployments Logmaining Server LCR LCR Primary Extract Local Trail Redo Logs Secondary Extract Data Pump Source DB 14 16.06.2015 Data Replication With Oracle GoldenGate

Replicat Process: Apply The Replicat process can run in either Classic Replicat mode (nonintegrated) - all database versions Coordinated Replicat mode (nonintegrated) - all database versions, GoldenGate 12c required Integrated Replicat mode database versions 11.2.0.4+ Target DB Replicat The Replicat process reads the remote trail, reconstructs the SQL and applies them to the target database Optionally filters/transforms the data Remote Trail The application of the data can be optionally delayed (DEFERAPPLYINTERVAL parameter) 15 16.06.2015 Data Replication With Oracle GoldenGate

Replicat Group: Classic/Coordinated Mode Classic Replicat Constructs SQL statements from the trails and applies the SQL through OCI Supported for all database versions Transactions are applied sequentially (single-threaded) Replicat SQL OCI Remote Trail Target DB Coordinated Replicat Transactions are applied in parallel (multi-threaded) There is 1 coordinator plus many apply threads Supported for all database versions Remote Trail Coordinator Thread 1 SQL OCI Target DB Thread 2 Thread n 16 16.06.2015 Data Replication With Oracle GoldenGate

Replicat Group: Integrated Mode Integrated Replicat Supported for target database versions 11.2.0.4+ Replicat LCR Database Inbound Server Target DB Constructs LCRs and transmits DMLs to the database inbound server Remote Trail SQL OCI Some changes (e.g. DDL) are not supported directly by the inbound server In those cases the Replicat process disconnects from the inbound server and executes the transaction in direct apply mode through OCI With many transactions applied in direct apply mode it might be necessary to switch to nonintegrated Replicat 17 16.06.2015 Data Replication With Oracle GoldenGate

Capture/Apply: CDB & Pluggable Databases Extract must operate in integrated mode Extract must connect to the CDB$ROOT container as a common user (c##) One Extract can capture from one or many PDBs to a single trail common_user_prefix (12.1.0.2) Replicat can connect and apply only to one PDB (one Apply/PDB, connect using service) Source DB CDB CDB$ROOT PDB1 PDB2 Target DB CDB CDB$ROOT PDB1 PDB2 Primary Extracts INTEGRATED Data Pumps Collectors Replicats 18 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate Topologies 19 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate Topologies Active-Passive Data replication only in one direction Only one set of primary Extract, Data Pump and Replicat groups Active/Standby Additional inactive primary Extract, Data Pump and Replicat groups Switchover: Stop one set of processes Start the inactive one 20 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate Topologies Active-Active Data replication in both directions Two active sets of primary Extract, Data Pump and Replicat groups With some restrictions: e.g.: DDL-support restricted to two databases with identical metadata Additionally broadcasting, cascading, consolidation is possible 21 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate Setup 22 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate: Setup Flow 1 2 3 Architecture Software Installation/ Design Patches Database Preparation 6 5 Primary Extract, Data 4 Register/Start Primary Pump, Replicat Extract, Data Pump Configuration Files Manager Configuration 7 8 9 Target Database Register/Start Replicat Instantiation Cluster Integration / INIT Scripts n Tuning/Customizing/ Maintenance/ 23 16.06.2015 Data Replication With Oracle GoldenGate

Supplemental Logging: Source 3 Database Preparation Activate minimal database level supplemental logging on the source database To add row chaining information to the redo stream SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; Add schema or table level supplemental logging on the source database Schema level logging is required for DDL support For all schema tables ADD SCHEMATRANDATA <schema> [ALLCOLS] Activates unconditional supplemental logging for PK and conditional for unique/foreign keys (scheduling columns) all existing an future tables For a table Depending on the use-case, different parameters are necessary ADD TRANDATA <schema>.<table> [COLS ( ) ALLCOLS] 24 16.06.2015 Data Replication With Oracle GoldenGate

Manager Configuration: Target/Source 4 Manager Configuration Manager configuration (tune the values according to your needs) <GG_HOME>/dirprm/mgr.prm PORT 7809 unreserved and unrestricted DYNAMICPORTLIST 7810-7910 AUTOSTART ER * AUTORESTART ER *, RETRIES 4, WAITMINUTES 4, RESETMINUTES 60 PURGEOLDEXTRACTS <...>/dirdat/*ext*/*t*, USECHECKPOINTS, & MINKEEPHOURS 4 LAGREPORTMINUTES 30 LAGINFOMINUTES 5 LAGCRITICALMINUTES 10 25 16.06.2015 Data Replication With Oracle GoldenGate

Primary Extract Configuration 5 Primary Extract, Data Pump, Replicat Configuration Files Create the configuration file for the primary Extract (source) EXTRACT app1ext1 SETENV (ORACLE_HOME = "/u00/app/oracle/product/11.2.0.4") USERIDALIAS ggadm_app1_11204 You need GoldeGate LOGALLSUPCOLS Credential Store UPDATERECORDFORMAT COMPACT DDL INCLUDE MAPPED EXCLUDE OBJNAME APP1.T4 & EXCLUDE OBJNAME APP1.T5 ENCRYPTTRAIL AES256 EXTTRAIL <...>/dirdat/app1ext1/lt SEQUENCE APP1.*; TABLE APP1.*; A Master-Key Wallet is necessary 26 16.06.2015 Data Replication With Oracle GoldenGate

Secondary Extract/Replicat Configuration Files 5 Primary Extract, Data Pump, Replicat Configuration Files Create the configuration file for the Data Pump Extract (source) Not necessary if the trail is already EXTRACT app1pmp1 encrypted USERIDALIAS ggadm_app1_11204 RMTHOST ggmgr-cl121.trivadis.com, MGRPORT 7809,ENCRYPT AES256,& COMPRESS, COMPRESSTHRESHOLD 1200 RMTTRAIL <...>/dirdat/app1rep1/rt SEQUENCE APP1.*; TABLE APP1.*; Create the configuration file for the Replicat group (target) REPLICAT app1rep1 SETENV (ORACLE_HOME = "/u00/app/oracle/product/12.1.0.2") DBOPTIONS INTEGRATEDPARAMS(parallelism 6) USERIDALIAS ggadm_app1_12102 DDLOPTIONS REPORT PDB ASSUMETARGETDEFS Mapping: non-cdb CDB MAP APP1.*, TARGET APP1.APP1.*; 27 16.06.2015 Data Replication With Oracle GoldenGate

Primary/Secondary Extract Group 6 Register/Start Primary Extract, Data Pump Register the primary Extract with the database (integrated) GoldeGate Credential DBLOGIN USERIDALIAS gg_app1_11204 Store REGISTER EXTRACT app1ext1 DATABASE [CONTAINER (APP1)] Extract APP1EXT1 successfully registered with database at SCN 3630440. Create the primary Extract group (integrated) ADD EXTRACT app1ext1, INTEGRATED TRANLOG, BEGIN NOW Add a local trail an associate it with the primary Extract ADD EXTTRAIL <...>/dirdat/app1ext1/lt, EXTRACT app1ext1 Add the Data Pump Extract ADD EXTRACT app1pmp1, EXTTRAILSOURCE <...>/dirdat/app1ext1/lt 28 16.06.2015 Data Replication With Oracle GoldenGate

Secondary Extract/Replicat Group 8 Register/Start Replicat Add a remote trail and associate it with the secondary Extract ADD RMTTRAIL <...>/dirdat/app1rep1/rt, EXTRACT app1pmp1 Add the Replicat group (integrated) ADD REPLICAT app1rep1, INTEGRATED, EXTTRAIL <...>/dirdat/app1rep1/rt Start the Replicat on the target with the correct CSN GGSCI> START REPLICAT app1rep1, AFTERCSN 3693221 29 16.06.2015 Data Replication With Oracle GoldenGate

Oracle GoldenGate: Demo Environment Source DB: 2-nodes RAC 11.2.0.4 Schema: APP1 GoldenGate version: 12.1.2.1.2 Active/Passive data replication Target DB: CDB 2-nodes RAC 12.1.0.2 PDB: APP1, Schema: APP1 GoldenGate version: 12.1.2.1.2 Active/Passive data replication CDB$ROOT APP1 APP2 APP3 Schema: APP1 Primary Extract INTEGRATED Local Trail RemoteTrail Replicat INTEGRATED Secondary Extract Data Pump Collector 30 16.06.2015 Data Replication With Oracle GoldenGate

31 16.06.2015 Data Replication With Oracle GoldenGate Core Messages

Core Messages GoldenGate is a very powerful replication software framework For most deployments the integrated Extract/Replicat is the best choice Supplemental logging generates more undo and redo In some cases you need even to supplementally log all columns! Script all the configuration steps Very useful if you need to re-setup the whole environment You don t need to replace your current Streams installation ASAP by Oracle GoldenGate, but Streams is deprecated in the version 12c and will not be enhanced in future releases There is a framework to ease the migration from Streams to GoldenGate (streams2ogg) As of now Streams is not supported with CDB architecture For new projects it might be a better choice (licensing)! 32 16.06.2015 Data Replication With Oracle GoldenGate

Questions and answers Robert Bialek Principal Consultant Partner Tel. +49 89 99275930 robert.bialek@trivadis.com 33 16.06.2015 Data Replication With Oracle GoldenGate