www.peoug.org 1-2 www.peoug.org



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

Rob Zoeteweij Zoeteweij Consulting

Dbvisit Replicate. Dbvisit Replicate Overview

Oracle DBA Course Contents

Oracle Data Guard. Caleb Small Puget Sound Oracle Users Group Education Is Our Passion

Real-time Data Replication

ORACLE CORE DBA ONLINE TRAINING

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Oracle Data Integration Solutions GoldenGate New Features Summary

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

Maximize Availability With Oracle Database 12c

I have been playing with Oracle Streams again lately. My goal is to capture changes in 10g and send them to a 9i database.

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Deploying Active-Active Data Centers Using Oracle Database Solutions

Oracle Data Guard for High Availability and Disaster Recovery

Disaster Recovery for Oracle Database

Oracle 9i Database Release 2 Enterprise Edition

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Oracle Database Cross Platform Migration Lucy Feng, DBAK

Data Integration Overview

<Insert Picture Here> Real-time database replication

Informatica Data Replication FAQs

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

Shadowbase Data Replication VNUG - May 26, Dick Davis, Sales Manager Shadowbase Products Group Gravic, Inc.

Module 14: Scalability and High Availability

Maximum Availability Architecture

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Delivery Method: Instructor-led, group-paced, classroom-delivery learning model with structured, hands-on activities.

Oracle9i Data Guard: SQL Apply Best Practices. An Oracle White Paper September 2003

SharePlex for Oracle How to replicate databases. Jeffrey Surretsky Solutions Architect

ORACLE DATABASE ADMINISTRATOR RESUME

DISASTER RECOVERY STRATEGIES FOR ORACLE ON EMC STORAGE CUSTOMERS Oracle Data Guard and EMC RecoverPoint Comparison

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

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

Nutech Computer Training Institute 1682 E. Gude Dr. #102 Rockville, MD Tel: Web:Nutechtraining.com

ORACLE DATABASE 11G: COMPLETE

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

Daniela Milanova Senior Sales Consultant

Oracle Database Backup & Recovery, Flashback* Whatever, & Data Guard

DBA / System Administrator. Activities E N A B L E R S O F T H E V I R T U A L E N T E R P R I S E

DbvisitConnect. Partner Enablement Guide. For Dbvisit Software Partners

Oracle Database Security and Audit

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

Implementing an Enterprise Class Database Backup and Recovery Plan

HP Shadowbase Solutions Overview

Oracle Maximum Availability Architecture with Exadata Database Machine. Morana Kobal Butković Principal Sales Consultant Oracle Hrvatska

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

The Future of PostgreSQL High Availability Robert Hodges - Continuent, Inc. Simon Riggs - 2ndQuadrant

Achieving Oracle Database Scalability using SharePlex

Oracle Database 10g: Backup and Recovery 1-2

Backup Types. Backup and Recovery. Categories of Failures. Issues. Logical. Cold. Hot. Physical With. Statement failure

Oracle Database 10g: New Features for Administrators

Oracle Database 10g: Administration Workshop II Release 2

Postgres Plus xdb Replication Server with Multi-Master User s Guide

How to Implement Multi-way Active/Active Replication SIMPLY

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

Oracle Database 12c: Administration Workshop NEW

ORACLE DATABASE ADMINISTRATION PROGRAM LEARNING OUTCOMES

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Oracle Database 11g: RAC Administration Release 2

ORACLE DBA 11G TRAINING

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

What's the Point of Oracle Checkpoints? Harald van Breederode Oracle University 29-OCT-2009

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063

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

Oracle Net Services: Best Practices for Database Performance and Scalability. Kant C Patel Director, Oracle Net Development

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

State of Wisconsin Database Hosting Services Roles and Responsibilities

<Insert Picture Here> Managing Storage in Private Clouds with Oracle Cloud File System OOW 2011 presentation

Oracle 11g Database Administration

Why Not Oracle Standard Edition? A Dbvisit White Paper By Anton Els

<Insert Picture Here> Oracle Database Directions Fred Louis Principal Sales Consultant Ohio Valley Region

Real-time High Volume Data Replication White Paper

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

Oracle9i Database Release 2 Product Family

SQL Server for Database Administrators Course Syllabus

Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills Course 6317A: Three days; Instructor-Led

AV-004: Administering and Programming with ORACLE

High Availability Infrastructure for Cloud Computing

Safeguard Sensitive Data in EBS: A Look at Oracle Database Vault, Transparent Data Encryption, and Data Masking. Lucy Feng

Beyond High Availability Replication s Changing Role

<Insert Picture Here> Oracle Cloud Storage. Morana Kobal Butković Principal Sales Consultant Oracle Hrvatska

ORACLE DATABASE: ADMINISTRATION WORKSHOP I

SharePlex for SQL Server

Oracle Total Recall with Oracle Database 11g Release 2

Advanced Oracle DBA Course Details

Oracle Database Security. Nathan Aaron ICTN 4040 Spring 2006

Using HP StoreOnce Backup systems for Oracle database backups

Maximum Availability Architecture

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

news from Tom Bacon about Monday's lecture

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

A Novel Approach of Using Data Guard for Disaster Recovery & Rolling Upgrades

Oracle Database. High Availability Overview 10g Release 2 (10.2) B

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

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: Administration Workshop NEW. Duration: 5 Days. What you will learn

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

Transcription:

Implementando Oracle Streams Una solución moderna de replicación de datos Miguel Palacios (miguel.palacios@gbsperu.net) PEOUG Day - 18 de Noviembre 2009

www.peoug.org 1-2 www.peoug.org

Mi Perfil: Miguel Palacios Fundador y CEO de Global Business Solutions Perú (GBSPERU.NET) Líder de PERU Oracle Users Group(PEOUG.ORG) Certificación OCP9i, OCP10g, 10g RAC Expert Experiencia Oracle: Arquitecto de soluciones con foco en infraestructura 7+ años Instructor certificado de Oracle University Oracle Database Beta Tester desde 2006 10+ años de Advanced Database Administration & Performance Tuning Oracle Backup& Recovery Oracle ASM: 10g R2, 11g R1, 11g R2 Oracle Data Guard: Physical and Logical9iR2, 10gR2, 11gR1 (Active Data Guard). Despliegues de basic standby sobre Standard Edition 8i, 9iR2, 10g R2. Oracle RAC: 9iR2, 10GR2, 11gR1 sobre HP-UX Itanium, Linux Itanium, Linux x86_64, Solaris, AIX (LPAR and VIO Server), Windows. Single Data Center & RAC Extendido Oracle Streams: 9i R2, 10g R2 (Database Levely Schema Level: Bi-Directional y Uni-Directional). Upstream& Downstream Capture Oracle VM: Despliegues de Oracle RAC 10gR2, Grid Control 10g, Oracle Enterprise Linux Oracle E-Business Suite 11i: Advanced Performance and Troubleshooting 1-3 www.peoug.org

Oracle Streams Simple solution for information sharing Heterogeneous Replication Provides Uniquely flexible information sharing Active/Active replication Real-time ETL for data warehouses Availability during database migration Availability during application upgrade Message queuing Event management and notification 1-4 www.peoug.org

<Insert Picture Here> Oracle Streams Architecture 1-5 www.peoug.org

Oracle Streams Capture and Apply Replication Configuration update EMP set job= coding where empid=510; empid job.. 100 sales 510 coding... Propagation ACK EMP Capture Apply Redo Log Local (Upstream) Capture If subset of data, network bandwidth requirements reduced significantly 1-6 www.peoug.org

Oracle Streams Downstream Capture update EMP set job= coding where empid=510; LGWR Redo Transport Method ASYNC or SYNC RFS empid job.. 100 sales 510 coding... Apply Propagation Capture Remote (Downstream) Capture Offload capture from production database 1-7 www.peoug.org

Extended Streams Architecture Powerful Solution for Information Sharing Source Database Target Database Propagate Redo Logs Capture Apply1 Apply2 Transparent Gateway Non-Oracle Database 1-8 www.peoug.org

Oracle Streams Process Architecture Redo Data Source Database Reader Redo Records Preparer Builder Logical Change Records not grouped into transactions Capture LCR LCR : Streams Pool Capture at Source, Downstream, or Target Database Propagation Target Database Datafiles Conflict Detection Error Handling Custom Code Applier Apply at Target Database Transactions to be applied Coordinator Reader Committed transactions grouped and sorted in dependency order LCR LCR : Streams Pool 1-9 www.peoug.org

<Insert Picture Here> Oracle Streams Configuration 1-10 www.peoug.org

Oracle Streams Configuration: Example One SOURCE with one TARGET One-way replication at SCHEMA level (HR) DML and DDL Capture on TARGET (Local Capture) SOURCE Global Name: S1.DOMAIN.COM TARGET Global Name: T1.DOMAIN.COM SOURCE and TARGET on Enterprise Linux SOURCE and TARGET on 10g R2 SOURCE is on ARCHIVELOG MODE with FORCE LOGGING 1-11 www.peoug.org

Step 0: INIT Parameters in SOURCE and TARGET alter system set open_links=4 alter system set log_parallelism=1 alter system set logmnr_max_persistent_sessions=4 alter system set global_names=true alter system set parallel_max_servers=5 alter system set open_links=4 alter system set aq_tm_processes=2 alter system set job_queue_processes=12 alter system set archive_lag_target =3600 alter system set "_first_spare_parameter"=50 alter system set "_kghdsidx_count"=1 alter system set "_job_queue_interval"=1 alter system set streams_pool_size=200m For WANs: (SQL*NET parameters) Increase SDU (sqlnet.ora, tnsnames.ora, listener.ora) Increase send_buf_size, recv_buf_size 1-12 www.peoug.org

Step 1: STRMADMIN User and Privileges SOURCE and TARGET create tablespace TS_STRADMIN datafile '/path/ts_stradmin01.dbf' size 100M autoextend on maxsize unlimited extent management local segment space management auto; create user STRMADMIN identified by PASSWORD default tablespace TS_STRADMIN; GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE, DBA to STRMADMIN; GRANT EXECUTE ON DBMS_AQADM TO STRMADMIN; GRANT EXECUTE ON DBMS_APPLY_ADM TO STRMADMIN; GRANT EXECUTE ON DBMS_CAPTURE_ADM TO STRMADMIN; GRANT EXECUTE ON DBMS_PROPAGATION_ADM TO STRMADMIN; GRANT EXECUTE ON DBMS_STREAMS TO STRMADMIN; GRANT EXECUTE ON DBMS_STREAMS_ADM TO STRMADMIN; GRANT EXECUTE ON DBMS_AQ TO STRMADMIN; GRANT EXECUTE ON DBMS_FLASHBACK TO STRMADMIN; GRANT EXECUTE ON DBMS_RULE_ADM TO STRMADMIN; GRANT SELECT ANY DICTIONARY TO STRMADMIN; 1-13 www.peoug.org

Step 2: Streams QUEUE in SOURCE and TARGET connect STRMADMIN/PASSWORD BEGIN DBMS_STREAMS_ADM.SET_UP_QUEUE( queue_table => 'STREAMS_QUEUE_TABLE', queue_name => 'STREAMS_QUEUE', queue_user => 'STRMADMIN'); END; / 1-14 www.peoug.org

Step 3: Apply RULES in TARGET connect STRMADMIN/STRMADMIN BEGIN DBMS_STREAMS_ADM.ADD_SCHEMA_RULES( schema_name => 'HR', streams_type => 'APPLY', streams_name => 'STRMADMIN_APPLY', queue_name => 'STRMADMIN.STREAMS_QUEUE', include_tagged_lcr => true, include_dml => true, include_ddl => true, source_database => 'S1.DOMAIN.COM'); END; / 1-15 www.peoug.org

Step 4: Apply USER in TARGET connect STRMADMIN/STRMADMIN BEGIN DBMS_APPLY_ADM.ALTER_APPLY( apply_name => 'STRMADMIN_APPLY', apply_user => 'HR'); END; / BEGIN DBMS_APPLY_ADM.SET_PARAMETER( apply_name => 'STRMADMIN_APPLY', parameter => 'DISABLE_ON_ERROR', value => 'N' ); END; / 1-16 www.peoug.org

Step 5: Logminer Tablespace connect SYS/PASSWORD as SYSDBA CREATE TABLESPACE LOGMNRTS DATAFILE '/path/logmnrts01.dbf' SIZE 100M AUTOEXTEND ON MAXSIZE UNLIMITED; BEGIN DBMS_LOGMNR_D.SET_TABLESPACE('LOGMNRTS'); END; / 1-17 www.peoug.org

Step 6: Supplemental logging in SOURCE and TARGET connect SYS/PASSWORD as SYSDBA ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS; Recommended at table level: ALTER TABLE HR.<TABLE_NAME> ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS; or ALTER TABLE HR. <TABLE_NAME> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS; 1-18 www.peoug.org

Step 7: Database link in SOURCE and TARGET SOURCE connect STRMADMIN/STRMADMIN CREATE DATABASE LINK T1.DOMAIN.COM connect to STRMADMIN identified by PASSWORD using 'TARGET_STRING'; select * from global_name@t1.domain.com; TARGET connect STRMADMIN/STRMADMIN CREATE DATABASE LINK S1.DOMAIN.COM connect to STRMADMIN identified by PASSWORD using 'SOURCE_STRING'; select * from global_name@s1.domain.com; 1-19 www.peoug.org

Step 8: Capture and Propagation RULES for HR schema in SOURCE connect STRMADMIN/STRMADMIN BEGIN DBMS_STREAMS_ADM.ADD_SCHEMA_RULES( schema_name => 'HR', streams_type => 'CAPTURE', streams_name => 'STREAM_CAPTURE', queue_name => 'STRMADMIN.STREAMS_QUEUE', include_tagged_lcr => true, include_dml => true, include_ddl => true, source_database => 'S1.DOMAIN.COM'); END; / BEGIN DBMS_STREAMS_ADM.ADD_SCHEMA_PROPAGATION_RULES( schema_name => 'HR', streams_name => 'STREAM_PROPAGATE', source_queue_name => 'STRMADMIN.STREAMS_QUEUE', destination_queue_name => 'STRMADMIN.STREAMS_QUEUE@T1.DOMAIN.COM', include_tagged_lcr => true, include_dml => true, include_ddl => true, source_database => 'S1.DOMAIN.COM'); END; / 1-20 www.peoug.org

Step 9: Export / Import Procedure SOURCE exp USERID=SYSTEM/PASSWORD OWNER=HR FILE=HR.dmp LOG=exportHR.log OBJECT_CONSISTENT=Y STATISTICS=NONE direct=y recordlength=65535 TARGET Create DATABASE structure like TABLESPACE and DATAFILES imp USERID=SYSTEM/PASSWORD full=y fromuser=hr touser=hr CONSTRAINTS=Y FILE=HR.dmp IGNORE=Y COMMIT=Y LOG=importHR.log STREAMS_INSTANTIATION=Y statistics=none 1-21 www.peoug.org

Step 10: Start CAPTURE process at SOURCE and APPLY process at TARGET SOURCE connect STRMADMIN/STRMADMIN begin DBMS_CAPTURE_ADM.START_CAPTURE(capture_name => 'STREAM_CAPTURE'); end; / TARGET connect STRMADMIN/STRMADMIN BEGIN DBMS_APPLY_ADM.START_APPLY(apply_name => 'STRMADMIN_APPLY'); END; / 1-22 www.peoug.org

Oracle Streams: Use Cases Offload transactional database using a replica database for adhoc queries and reporting. Maintain updated QA or DEV Databases. Upgrade database version with minimal downtime, for example 9iR2 to 10g R2 or 10gR2 to 11gR1 using STREAMS capture process. Using Streams as part of the Oracle Disaster Recovery solutions, for example SOURCE on AIX with a streams replica on Linux (DELETES could be a problem!) Distributed databases, for example one local master database with several remote (replica) databases. Hub-and-Spoke Configurations. Streams replication using Enterprise Edition as SOURCE database with Standard Edition as TARGET database (one-way streams replication) Oracle 11g SE -> SE synchronous replication 1-23 www.peoug.org

www.peoug.org