1 / 30

ADVANCE REPLICATION

ADVANCE REPLICATION. Oracle Coretech Surabaya (OCS) One Day Seminar Surabaya, August 30 th 2008. AGENDA. Introduction Master – View Replication. Multimaster & Hybrid Case 1 (Master – View with subset) Case 2 (Full Schema & Cross OS & DB) Troubleshoot. Overview Of Replication. Site #1.

dayton
Télécharger la présentation

ADVANCE REPLICATION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ADVANCE REPLICATION Oracle Coretech Surabaya (OCS) One Day Seminar Surabaya, August 30th 2008

  2. AGENDA • Introduction • Master – View Replication • Multimaster & Hybrid • Case 1 (Master – View with subset) • Case 2 (Full Schema & Cross OS & DB) • Troubleshoot

  3. Overview Of Replication Site #1 Site #2 Replicate Transaction User Database Replica Database

  4. Overview Of Replication • Replication is the process of copying and maintaining database objects, such as tables,in multiple databases that make up a distributed database system.

  5. Application Replication typically apply for multiple site enterpise application. • Central – remote site application • Autonomous remote sites • Data integration consistency

  6. Advance Replication Benefit Oracle Advance Replication benefit: • Failover • Load Balancing (Site Autonomy) • Interoperability (Can replicate data beetween different platform) • Enable Data Subsetting

  7. Oracle HA Road Map Integration High Availability (HA) 8i Basic Replication Advanced Replication Basic readable standby database (Physical Standby - Redo Apply) 9i Oracle Streams Data Guard + SQL Apply (Logical Standby) 10g Data Guard + Fast-start failover + Reinstante 11g Active Data Guard

  8. Prerequites Knowledge Oracle Database Administrator (DBA) I : … 6. Database User Account : 7. Managing Schema Object : • Table • Index • View • …. 11. Configuring Oracle Network Env.

  9. Materialized View (MV) • View = stored select … query • MView = View which is materialized from a single point of time = snapshot  table SNAPSHOT MATERIALIZED VIEW 7.0 – 7.3 8.0 8i 9i 10g 11g

  10. Create Materialized View Updatable View : CREATE VIEW HR.V_COUNTRIES AS select * from hr.countries; Read Only MV : CREATE MATERIALIZED VIEW HR. MV_COUNTRIES AS select * from hr.countries;

  11. Create Materialized View (2) Read Only View : CREATE VIEW HR.V_COUNTRIES2 AS select * from hr.countries WITH READ ONLY; Updatable MV : CREATE MATERIALIZED VIEW HR. MV_COUNTRIES2 FOR UPDATE AS select * from hr.countries;

  12. View Vs MV SQL> Select TNAME, TAB from tab like '%COUNTRIES'; TNAME TAB ================ ===== COUNTRIES TABLE MV_COUNTRIES TABLE V_COUNTRIES VIEW SQL> select MVIEW_NAME, UPDATABLE from user_mviews; MVIEW_NAME U ==================== = MV_COUNTRIES N MV_COUNTRIES2 Y

  13. Refresh • Refresh Type • Complete • Fast • Force • Refresh Method • Primary Key • Row ID

  14. Refresh • Refresh Interval • on demand • on commit • automatically on • never

  15. Database Link Private & Fixed User CREATE DATABASE LINK hr.target_db CONNECT TO hr IDENTIFIED BY hr123 USING net_target; Public & Connected User CREATE DATABASE LINK PUBLIC target_db USING net_target; Current User CREATE DATABASE LINK target_db CONNECT TO CURRENT_USER USING net_target;

  16. Materialized View Log CREATE MATERIALIZED VIEW LOG ON Hr.countries WITH PRIMARY KEY (country_id)

  17. Refresh Group EXEC DBMS_REFRESH.MAKE ('group1', ‘mv_countries', SYSDATE, 'next_day(trunc(sysdate), '/*1:Hrs*/ sysdate + 1/24', FALSE, TRUE);

  18. Advance Replication Type • Materialized View Replication (Master – View ) • Multimaster Replication • Hybrid

  19. Materialized View(Master – View) Master Site Materialized View Site

  20. Multimaster • peer-to-peer or n-way replication • equally participating in an update-anywhere model Master Site tables Replication group orcl.site1 tables Master Site tables Master Site Replication group Replication group prod.site3 orcl.site2

  21. Hybrid Master Site Master Site Master Site Mview Site

  22. Master – View tables Master Site mview log Database link Master Group Database link Materialized View Site mview mview Group

  23. Step 1Master Site Setup • Create replication user adminitrator • Create materialized view user administrator

  24. Step 2Master Site Group • Create Master Site Group

  25. Step 3Materialized view Log • Define tables to replicate then create materialized view log • Add to Master Site Group

  26. Step 4Materialized View Site Setup • Create materialized view user administrator • Create Database link to master

  27. Step 5Materialized View Group • Create Materialized View Group

  28. Step 6Materialized View • Create Materialized View • Add to Materialized View Group

  29. Master – View using prebuilt table tables Master Site mview log Database link Master Group Database link Materialized View Site Prebuilt tables mview Group

  30. ADVANCE REPLICATION

More Related