Ing. Erick López Ch. M.R.I. Replicación Oracle. What is Replication  Replication is the process of copying and maintaining schema objects in multiple.

Slides:



Advertisements
Similar presentations
Types of Distributed Database Systems
Advertisements

Oracle Materialized Views for Replication COUG Presentation, Feb 20, 2014 Jane Lamont,
Chapter 10: Designing Databases
Manajemen Basis Data Pertemuan 12 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Chapter 24 Replication and Mobile Databases Transparencies © Pearson Education Limited 1995, 2005.
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 13 (Web): Distributed Databases
1 Distributed Databases Chapter Two Types of Applications that Access Distributed Databases The application accesses data at the level of SQL statements.
Data Replication with Materialized Views ISYS 650.
Overview Distributed vs. decentralized Why distributed databases
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Lecture-10 Distributed Database System A distributed database system consists of loosely.
Hands-On Microsoft Windows Server 2003 Administration Chapter 3 Administering Active Directory.
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
CS 603 Data Replication in Oracle February 27, 2002.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Distributed Databases
Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically.
ADVANCED MICROSOFT ACTIVE DIRECTORY CONCEPTS
ADVANCE REPLICATION Oracle Coretech Surabaya (OCS) One Day Seminar Surabaya, August 30 th 2008.
MS Access Advanced Instructor: Vicki Weidler Assistant:
(ITI310) SESSIONS : Active Directory By Eng. BASSEM ALSAID.
SQL Server Replication By Karthick P.K Technical Lead, Microsoft SQL Server.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
Oracle Data Block Oracle Concepts Manual. Oracle Rows Oracle Concepts Manual.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li Pusan National University.
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
Module 7: Resolving NetBIOS Names by Using Windows Internet Name Service (WINS)
1 IRU Concurrency, Reliability and Integrity issues Geoff Leese October 2007 updated August 2008, October 2009.
1 Configuring Advanced Replication Julian Dyke Independent Consultant Web Version - July 2009 juliandyke.com © 2009 Julian Dyke.
Views In some cases, it is not desirable for all users to see the entire logical model (that is, all the actual relations stored in the database.) In some.
Chapter 15: Achieving High Availability Through Replication.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 Distributed Databases BUAD/American University Distributed Databases.
PMIT-6101 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Controlling User Access Fresher Learning Program January, 2012.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
INTRODUCTION lecture1 1. Data base concept Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that.
Chapter 13 Views Oracle 10g: SQL. Oracle 10g: SQL2 Objectives Create a view, using CREATE VIEW command or the CREATE OR REPLACE VIEW command Employ the.
Session 1 Module 1: Introduction to Data Integrity
Chapter 4 Indexes. Indexes Logically represents subsets of data from one or more tables View Generates numeric valuesSequence Basic unit of storage; composed.
Introduction to Active Directory
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
SCALING AND PERFORMANCE CS 260 Database Systems. Overview  Increasing capacity  Database performance  Database indexes B+ Tree Index Bitmap Index 
Creating and Revoking Object Privileges. 2 home back first prev next last What Will I Learn? Explain what a ROLE is and what its advantages are. Construct.
14 Copyright © 2004, Oracle. All rights reserved. Using Materialized Views.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
 CONACT UC:  Magnific training   
Distributed Databases
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Chapter Name Replication and Mobile Databases Transparencies
Controlling User Access
Controlling User Access
IS221: Database Management
Chapter 4 Indexes.
CH 4 Indexes.
CH 4 Indexes.
Contents Preface I Introduction Lesson Objectives I-2
ADVANCE REPLICATION II
Introduction of Week 14 Return assignment 12-1
Overview Multimedia: The Role of WINS in the Network Infrastructure
Presentation transcript:

Ing. Erick López Ch. M.R.I. Replicación Oracle

What is Replication  Replication is the process of copying and maintaining schema objects in multiple databases that make up a distributed database system.  Replication can improve the performance and protect the availability of applications because alternate data access options exist.

Basic Replication  Data replicas provide read-only access to the table data that originates from a primary or “master” site.  Applications can query data from local data replicas to avoid network access regardless of network availability.  Applications throughout the system must access data at the primary site when updates are necessary.

Basic Replication

Advance Replication  Extend the capabilities of basic read-only replication by allowing applications to update table replicas throughout a replicated database system.  With advanced replication, data replicas anywhere in the system can provide both read and update access to a table’s data.  Participating Oracle database servers automatically work to converge the data of all table replicas, and ensure global transaction consistency and data integrity.

Advance Replication

Basic Replication Concepts  Support applications requiring read-only access to table data originating from a primary site.  Uses of Basic Replication.  Read-Only Table Snapshots.  Snapshot Refreshes.

Uses of Basic Replication  Basic replication is useful for information distribution.  Information Off-Loading  Information Transport

Read-Only Table Snapshots  A read-only table snapshot is a local copy of table data originating from one or more remote master tables.  An application can query the data in a read-only table snapshot, but cannot insert, update, or delete rows in the snapshot.

Read-Only Table Snapshots

 A Snapshot’s Defining Query The logical data structure of table snapshots is defined by a query that references data in one or more remote master tables. A snapshot's defining query determines what data the snapshot will contain.  Should be such that each row in the snapshot corresponds directly to a row or a part of a row in a single master table.

Read-Only Table Snapshots  A Snapshot’s Defining Query The logical data structure of table snapshots is defined by a query that references data in one or more remote master tables. A snapshot's defining query determines what data the snapshot will contain.  Should be such that each row in the snapshot corresponds directly to a row or a part of a row in a single master table.

Read-Only Table Snapshots  Should not contain a distinct or aggregate function, a GROUP BY or CONNECT BY clause, join, restricted types of subqueries, or a set operation.  CREATE SNAPSHOT sales.customers AS SELECT * FROM

Read-Only Table Snapshots  CREATE SNAPSHOT sales.orders AS SELECT * FROM o WHERE EXISTS ( SELECT c_id FROM c WHERE o.c_id = c.c_id AND zip = 19555);  SNAP$_snapshotname

Snapshot Refreshes  You must decide how and when to refresh each snapshot to make it a more current.  Analyze application characteristics and requirements to determine appropriate snapshot refresh intervals.  To refresh snapshots, Oracle supports different types of refreshes, “complete” and “fast” snapshot refresh groups, as well as “manual” and “automatic” refreshes.

Complete and Fast Refreshes  Complete Refreshes  The server that manages the snapshot executes the snapshot's defining query.  The result set of the query replaces the existing snapshot data to refresh the snapshot.  Oracle can perform a complete refresh for any snapshot.

Complete and Fast Refreshes  Fast Refreshes  The server that manages the snapshot first identifies the changes that occurred in the master since the most recent refresh of the snapshot and then applies them to the snapshot.  Fast refreshes are more efficient than complete refreshes when there are few changes to the master because participating servers and networks replicate less data.  Fast refreshes are available for snapshots only when the master table has a snapshot log.

Complete and Fast Refreshes  Complete Refreshes  The server that manages the snapshot executes the snapshot's defining query.  The result set of the query replaces the existing snapshot data to refresh the snapshot.  Oracle can perform a complete refresh for any snapshot.

Advanced Replication Concepts  Disconnected Environments  Advanced replication is useful for the deployment of transaction processing applications that operate using disconnected components.  Failover Site  protect the availability of a mission critical database.

Advanced Replication Concepts  Distributing Application Loads  Transaction processing applications that require multiple points of access to database information  Information Transport  data warehouse or data mart.

Advanced Replication Configurations  Multimaster Replication  Allows multiple sites, acting as equal peers, to manage groups of replicated database objects.  Applications can update any replicated table at any site in a multimaster configuration.

Advanced Replication Configurations

 Snapshot Sites and Updatable Snapshots  Master sites in an advanced replication system can consolidate information that applications update at remote snapshot sites.  Facility allows applications to insert, update, and delete table rows through updatable snapshots.

Advanced Replication Configurations

 Updatable snapshots have the following properties:  Updatable snapshots are always simple, fast- refreshable table snapshots.  Oracle propagates the changes made through an updatable snapshot to the snapshot’s remote master table.  If necessary, the updates then cascade to all other master sites.  Oracle refreshes an updatable snapshot as part of a refresh group identical to read-only snapshots.

Advanced Replication Configurations  Hybrid Configurations  Multimaster replication and updatable snapshots can be combined in hybrid or “mixed” configurations to meet different application requirements.  Can have any number of master sites and multiple snapshot sites for each master.

Advanced Replication Configurations

 Differences between updatable snapshots and replicated masters:  Replicated masters must contain data for the full table being replicated, whereas snapshots can replicate subsets of master table data.  Multimaster replication allows you to replicate changes for each transaction as the changes occur.  If conflicts occur from changes made to multiple copies of the same data, master sites detect and resolve the conflicts.

Replication Conflicts  Uniqueness Conflicts  A uniqueness conflict occurs when the replication of a row attempts to violate entity integrity (a PRIMARY KEY or UNIQUE constraint).  Update Conflicts  Occurs when the replication of an update to a row conflicts with another update to the same row. Update conflicts occur when two different transactions originating from different sites update the same row at nearly the same time.

Replication Conflicts  Delete Conflicts  Occurs when two transactions originate from different sites, with one transaction deleting a row that the other transaction updates or deletes.

Using Basic Replication 1. Design the basic replication environment. Decide which master tables you want to replicate using read-only table snapshots, and which databases require such snapshots. 2. At each snapshot site, create the schemas and database links necessary to support snapshots. 3. At the master site, create the snapshot logs necessary to support fast refreshes of all snapshots.

Using Basic Replication 4. Create the snapshots at each snapshot site. 5. At each snapshot site, create the refresh groups that the snapshots will use to refresh, and assign each snapshot to a refresh group. 6. Grant privileges necessary for application users to access snapshots.

Step 2: Create Snapshot Site Schemas and Database Links  CONNECT  CREATE USER scott IDENTIFIED BY tiger QUOTA UNLIMITED ON data;  GRANT CONNECT TO scott;  CONNECT  CREATE DATABASE LINK dbs1 CONNECT TO scott IDENTIFIED BY tiger USING ‘dbs1’;

Step 3: Create Necessary Master Site Snapshot Logs  CONNECT  CREATE SNAPSHOT LOG ON scott.emp;  CREATE SNAPSHOT LOG ON scott.dept;

Step 4: Create Snapshots  CONNECT  CREATE SNAPSHOT scott.emp AS SELECT * FROM  CREATE SNAPSHOT scott.dept AS SELECT * FROM

Step 5: Create Snapshot Site Refresh Groups  CONNECT  DBMS_REFRESH.MAKE( name => ’scott.refgrp1’, list => ’scott.dept,scott.emp’, next_date => SYSDATE, interval => ’SYSDATE+1/24’); (1/1440)  COMMIT;

Step 6: Grant Access to Snapshots  GRANT SELECT ON scott.emp TO... ;