+ All Categories
Home > Documents > Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · •...

Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · •...

Date post: 02-Sep-2018
Category:
Upload: voduong
View: 240 times
Download: 0 times
Share this document with a friend
22
Oracle9i Database: Advanced Replication Student Guide • Volume 1 D12625GC10 Production 1.0 January 2002 D34351
Transcript
Page 1: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Oracle9i Database: Advanced Replication

Student Guide • Volume 1

D12625GC10Production 1.0January 2002D34351

Page 2: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Copyright © Oracle Corporation, 2002. All rights reserved.

This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable:

Restricted Rights Legend

Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988).

This material or any portion of it may not be copied in any form or by any means without the express prior written permission of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties.

If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with “Restricted Rights,” as defined in FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987).

The information in this document is subject to change without notice. If you find any problems in the documentation, please report them in writing to Education Products, Oracle Corporation, 500 Oracle Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free.

Oracle and all references to Oracle products are trademarks or registered trademarks of Oracle Corporation.

All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.

Authors

Karen KehnJanet Stern

Technical Contributorsand ReviewersDonna HambyAlexander HunoldBarb JaneczkoSusan JangKari JyralaPat McElroy Maria Pratt Inderpal Tahim Faye Todd

Publisher

May Lonn Chan-Villareal

Page 3: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface

Page 4: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface - 2

Page 5: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface - 3

Profile

Before You Begin This Course

Before you begin this course, you should have the following qualifications:

• Thorough knowledge of database administration commands and techniques.

• Working experience with distributed database concepts and database links.

Prerequisites

• Oracle9i Database Administration Fundamentals I

• Oracle9i Database Administration Fundamentals II

How This Course Is Organized

Oracle9i Database: Advanced Replication is an instructor-led course featuring lecture and hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts and skills introduced.

Page 6: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface - 4

Related Publications

Oracle Publications

Title Part Number

Oracle9i Replication Release 1 (9.0.1) A87499-02

Oracle9i Replication Management API Reference Release 1 (9.0.1) A87502-01

Oracle9i Data Warehousing Guide Release 1 (9.0.1) A90237-01

Additional Publications

• System release bulletins

• Installation and user’s guides

• read.me files

• International Oracle User’s Group (IOUG) articles

• Oracle Magazine

Page 7: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface - 5

Typographic Conventions

Typographic Conventions in Text

Convention Element Example

Bold italic Glossary term (if there is a glossary)

The algorithm inserts the new key.

Caps and lowercase

Buttons, check boxes, triggers, windows

Click the Executable button. Select the Can’t Delete Card check box. Assign a When-Validate-Item trigger to the ORD block. Open the Master Schedule window.

Courier new, case sensitive (default is lowercase)

Code output, directory names, filenames, passwords, pathnames, URLs, user input, usernames

Code output: debug.set (‘I”, 300); Directory: bin (DOS), $FMHOME (UNIX) Filename: Locate the init.ora file. Password: User tiger as your password. Pathname: Open c:\my_docs\projects URL: Go to http://www.oracle.com User input: Enter 300 Username: Log on as scott

Initial cap Graphics labels (unless the term is a proper noun)

Customer address (but Oracle Payables)

Italic Emphasized words and phrases, titles of books and courses, variables

Do not save changes to the database. For further information, see Oracle7 Server SQL Language Reference Manual. Enter [email protected], where user_id is the name of the user.

Quotation marks

Interface elements with long names that have only initial caps; lesson and chapter titles in cross-references

Select “Include a reusable module component” and click Finish. This subject is covered in Unit II, Lesson 3, “Working with Objects.”

Uppercase SQL column names, commands, functions, schemas, table names

Use the SELECT command to view information stored in the LAST_NAME column of the EMP table.

Page 8: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface - 6

Typographic Conventions in Code

Typographic Conventions in Navigation Paths

This course uses simplified navigation paths, such as the following example, to direct you through Oracle Applications.

(N) Invoice—>Entry—>Invoice Batches Summary (M) Query—>Find (B) Approve

This simplified path translates to the following:

1. (N) From the Navigator window, select Invoice—>Entry—>Invoice Batches Summary.

2. (M) From the menu, select Query—>Find.

3. (B) Click the Approve button.

N = Navigator, M = Menu, B = Button

Convention Element Example

Arrow Menu paths Select File—> Save.

Brackets Key names Press [Enter].

Commas Key sequences Press and release keys one at a time:[Alternate], [F], [D]

Plus signs Key combinations Press and hold these keys simultaneously:[Ctrl]+[Alt]+[Del]

Convention Element Example

Caps and lowercase

Oracle Forms triggers

When-Validate-Item

Lowercase Column names, table names

SELECT last_name FROM s_emp;

Passwords DROP USER scott IDENTIFIED BY tiger;

PL/SQL objects OG_ACTIVATE_LAYER (OG_GET_LAYER (‘prod_pie_layer’))

Lowercase italic Syntax variables CREATE ROLE role

Uppercase SQL commands and functions

SELECT userid FROM emp;

Page 9: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Preface

1 Oracle9i Database: Advanced ReplicationCourse Objectives 1-2Curriculum Overview 1-3Advanced Replication Topics 1-4Practice 1 Overview: Database Assignment and Configuration 1-7Practice 1 Overview: Gathering Configuration Information 1-8

2 Advanced Replication Objectives 2-2Overview 2-3What Is Replication? 2-4Unidirectional Replication 2-5Bi-directional Replication 2-6Multimaster Replication 2-7Synchronous Propagation 2-8Asynchronous Propagation 2-9Propagation of Deferred RPCs 2-11Transactional Data Propagation 2-14Error Handling of Deferred RPCs 2-15Recovery of Deferred RPCs 2-16Performance Optimization 2-17Serial and Parallel Propagation 2-18Replication Components 2-19Replicating Database Objects 2-20Unsupported Replication Objects 2-21Supported Datatypes for Replication 2-22Replicating Sequences 2-23Replication Groups 2-24Replication Sites 2-25Master Site 2-26Materialized View Site 2-27Types of Replication Environments 2-28Multimaster Replication 2-29Materialized Views 2-31

Contents

iii

Page 10: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Materialized View Replication 2-32Replication with Materialized Views 2-33Types of Materialized Views 2-34Materialized View Replication 2-35Updatable Materialized Views 2-36Single-Master Replication 2-37Hybrid Configuration 2-38Oracle Deployment Templates 2-39Data Distribution: Basic Techniques 2-40Basic Techniques: Primary Site Ownership 2-41Basic Techniques: Data Subsets 2-42Basic Techniques: Horizontal and Vertical Subsets 2-43Data Distribution: Advanced Techniques 2-44Advanced Techniques: Dynamic Ownership 2-45Advanced Techniques: Shared Ownership 2-46Advanced Techniques: Replication Model 2-47Row-Level Replication 2-48Data Conflicts in Replication Systems 2-49Procedural Replication 2-50Administration Tools for Replication 2-51Replication Management GUI Tool 2-52Replicating DDL Statements 2-54Summary 2-55Practice 2 Overview 2-56

3 Job QueueObjectives 3-2Job Queue and Job Queue Processes 3-3Administering the Job Queue 3-4Executing Jobs 3-5Altering a Job in the Job Queue 3-6Manually Execute a Job in the Job Queue 3-7Job Execution Problems 3-8Broken Jobs 3-9Removing a Job from the Job Queue 3-10Replication Jobs in the Job Queue at the Master Site 3-11Viewing Job Queue Information 3-12

iv

Page 11: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Diagnosing Problems with the Job Queue 3-14Summary 3-17Practice 3 Overview 3-18

4 Deferred TransactionsObjectives 4-2Deferred Transactions 4-3Deferred Transaction Components 4-4Specifying a Destination 4-5Initiating a Deferred Transaction 4-6Deferring a Remote Procedure Call 4-8Deferring a Remote Procedure Call: Example 4-10Querying Information About a Deferred Transaction 4-11Querying a Deferred Transaction 4-13Querying Information About a Remote Procedure Call 4-14Querying Information About the Destination of a Deferred Transaction 4-16Querying the Destination of a Deferred Transaction 4-17Pushing Deferred Transactions 4-18Propagating Deferred Transactions 4-19Propagating Deferred Transactions 4-20SCHEDULE_PUSH 4-21Configuring the Push Mechanism 4-23Push Mechanism with Replicated Tables 4-24Frequency of Propagation 4-25Scheduling Almost-Continuous Pushes 4-26Serial Propagation of Deferred Transactions 4-27Parallel Propagation of Deferred Transactions 4-28Parallel Propagation 4-29Parallel Propagation Dependency Tracking 4-30Parallel Propagation and Row-Level SCNs 4-31Features of Row-Level Dependency Tracking 4-32Purging the Deferred Transactions 4-33Scheduling Purges of Deferred Transactions 4-34SCHEDULE_PURGE 4-35

v

Page 12: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Manually Purge Deferred Transactions 4-37Purge Mechanism 4-40Queued Transactions 4-41Diagnosing Problems with Deferred Transactions 4-42Deleting Deferred Transactions 4-44Delete Scheduled Links 4-46Summary 4-47

5 Master Replication: Concepts and ArchitectureObjectives 5-2Comparison of Master Sites and Materialized View Sites 5-3Master Definition Site 5-4Master Replication Concepts 5-5Master Replication Architecture 5-6Multimaster Replication Users 5-7Types of Database Links 5-9Security Context with Links 5-10Database Links 5-11Multimaster DML Replication 5-13Replication Administration 5-15Administrative Requests 5-16DBA_REPCATLOG 5-17DO_DEFERRED_REPCAT_ADMIN Periodic Job Execution 5-19Common Problems with Administration Requests 5-20Quiescing the Replicated Environment 5-21Replicating Changes to Objects 5-29Survivability 5-30Summary 5-35Practice 5 Overview 5-36

6 Configuring a Master SiteObjectives 6-2Multimaster Environment Flowchart 6-3Single Master Environment Flowchart 6-4Before You Start 6-5Before You Start: Other init.ora Parameters 6-7Before You Start: Reset Database GLOBAL_NAME 6-9Master Site Setup Flowchart 6-10

vi

Page 13: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Step 1: Create Replication Users and Grant Replication Privileges 6-11Step 2: Register the Propagator 6-12Step 3: Schedule the Purge Job 6-14All Remaining Master Sites: Repeat Steps 1–4 6-17On Each Master Site: Perform Steps 5–7 6-18Step 5: Create Database Links 6-19Multiple Links to Same Destination 6-22Step 6: Create Scheduled Links 6-23Step 7 (Verification): View Site Properties 6-24Step 7 (Verification): Verify Database Links 6-25Step 7 (Verification): Test Global Names and Database Links 6-26Step 7 (Verification): Test Scheduled Links 6-27Step 7 (Verification): View Purge Job Properties 6-28Alternative Setup Method: Replication Management Tool Setup Wizard 6-29Capturing Setup Scripts 6-30Diagnosing Problems With Database Links 6-31Summary 6-32Practice 6 Overview 6-33

7 Creating Master GroupsObjectives 7-2Master Groups 7-3Master Group Rules 7-4Using Multiple Master Groups 7-5Master Group Creation Flowchart 7-6Step 1: Create Schema at All Sites 7-7Step 2: Add Primary Key, Where Missing 7-8Step 3: Create Master Group 7-9Quiescing Master Groups 7-10Step 4: Add Objects to Master Group 7-11Adding an Object to a Replication Group 7-12USE_EXISTING_OBJECT and COPY_ROWS Parameters 7-15Adding a New Object to a Replication Group 7-16Step 5: Add Additional Master Sites 7-17Steps to Add A Master Site with Online Instantiation 7-18Steps to Add A Master Site 7-19Step 6: Add Conflict Resolution 7-20Step 7: Generating Replication Support for Replication Objects 7-21Generating Replication Support 7-22Verifying Master Group Creation 7-25

vii

Page 14: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

8 Managing Master Groups and Master SitesObjectives 8-2Altering Replicated Database Objects 8-3ALTER_MASTER_REPOBJECT 8-4Altering Replicated Database Objects 8-5Safe Table Changes 8-7DROP_MASTER_REPOBJECT 8-8Dropping a Replicated Object 8-9Altering Data Propagation Method 8-10Relocating the Master Definition Site 8-13Dropping a Master Site 8-15Dropping a Replicated Group from a Master Site 8-17Dropping a Master Replication Group 8-18Administrative Request Propagation 8-19DO_DEFERRED_REPCAT_ADMIN Success and Failure 8-20Apply Outstanding Requests Manually 8-21PURGE_MASTER_LOG 8-22Executing Asynchronous DDL at Various Replication Sites 8-23EXECUTE_DDL Example 8-24Diagnosing Problems with Master Sites 8-25Troubleshooting Problems with Administrative Requests 8-27Summary 8-28Practice 8 Overview 8-29

9 Avoiding and Detecting ConflictsObjectives 9-2What is a Replication Conflict? 9-3Conflict Example 1: Reservation System 9-4Conflict Example 2: Customer Data 9-5Error Queue 9-6Types of Replication Conflicts 9-7Identifying Rows for Conflict 9-8Detecting Conflicts 9-9Conflict Detection Error Types 9-10Data Consistency and Convergence 9-11 Conflict Avoidance and Resolution: Foundation 9-12Conflict Resolution Responsibilities 9-13Avoiding Conflicts: Overview 9-14Column Groups 9-15Shadow Column Groups 9-16Column Groups 9-17Column Groups: Design Considerations 9-18

viii

Page 15: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Using Column Groups 9-20Making Column Groups 9-21Making Column Groups: Example 9-22Dropping Columns from Column Groups: Example 9-23Viewing Column Groups 9-24Replication Conflict Mechanisms 9-25Avoiding Conflicts 9-26Avoiding Conflicts: Primary Site Ownership 9-27Dynamic Site Ownership: Workflow Method 9-28Dynamic Site Ownership: Token Passing 9-29Token Passing: Locating the Owner 9-30Token Passing: Becoming the Owner 9-31Token Passing: Updating the Row 9-33Token Passing: Propagating the Changes 9-34Avoiding Uniqueness Conflicts 9-35Avoiding Delete Conflicts 9-36Conflict Avoidance Limitations: Ordering Conflicts 9-37Conflict Avoidance Limitations: Shared Ownership 9-38Conflict Detection at Replicated Sites 9-39Summary 9-40Practice 9 Overview

10 Resolving ConflictsObjectives 10-2Methods for Resolving Update Conflicts 10-3Resolving Update Conflicts in Single Master Systems 10-4Resolving Update Conflicts with Two Master Sites 10-5Resolving Update Conflicts in Multimaster Systems 10-6Multimaster Example: Data Divergence 10-7LATEST TIMESTAMP Method 10-8LATEST TIMESTAMP Method: Time Zones 10-10EARLIEST TIMESTAMP Method 10-11OVERWRITE Method 10-12ADDITIVE Method 10-13AVERAGE Method 10-14DISCARD Method 10-15MAXIMUM and MINIMUM Methods 10-16PRIORITY GROUP and SITE PRIORITY Methods 10-17Managing Priority Groups 10-18Defining Priority Groups Example 10-19

ix

Page 16: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

PRIORITY GROUP Method: Dynamic Ownership 10-21SITE PRIORITY Method: Static Site Ownership 10-22Managing Site Priorities 10-23Defining Site Priorities 10-24Adding Site Priority Sites 10-25Target Environments for Conflict Resolution Methods 10-26Conflicts Resolution Methods for Uniqueness Conflicts 10-27Creating Unique Conflict Resolution Method 10-28Generating Uniqueness by Appending 10-29Avoiding Uniqueness Conflicts by Discarding 10-30Delete Conflicts 10-31Auditing Conflict Resolution 10-32Managing Conflict Resolution Statistics 10-33Auditing Conflict Resolution 10-34Minimizing Propagated Data10-36Minimizing Communication 10-37Further Optimization 10-38The SEND_OLD_VALUES Procedure 10-39The COMPARE_OLD_VALUES Procedure 10-41SEND_OLD_VALUES and COMPARE_OLD_VALUES: Example 10-43Implementing Conflict Resolution 10-44Demonstration 10-45Demonstration: Problem Declaration 10-46Demonstration: Conflict Resolution Columns 10-47Demonstration: Conflict Resolution Trigger 10-48Demonstration: Implementing Conflict Resolution 10-49Demonstration: Create Column Groups 10-50Demonstration: Define Site Priority 10-51Demonstration: Register Conflict Resolution Methods 10-52Summary 10-54Practice 10 Overview 10-55

11 Adding Master SitesObjectives 11-2Adding Master Sites to a Master Group 11-3Adding a Master Site with Simple Online Instantiation 11-4Adding a Master Site with a Large Amount of Data 11-5What Is Offline Instantiation? 11-6DBMS_OFFLINE_OG Package 11-7Using Offline Instantiation 11-8

x

Page 17: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Extended Availability of Replication Environment 11-18Adding a Master Site without Quiescing 11-19Examining the Results of the SPECIFY_NEW_MASTERS Procedure 11-24Adding a Master Site without Quiescing 11-25The ADD_NEW_MASTERS Procedure 11-26ADD_NEW_MASTERS: Example 11-29Examining the Results of ADD_NEW_MASTERS 11-30Adding a Master Site without Quiescing 11-31RESUME_PROPAGATION_TO_MDEF Procedure 11-32Adding a Master Site without Quiescing 11-33Adding New Master Sites 11-35When to Add Master Sites without Quiescing 11-37Adding a Master Site without Quiescing 11-38Instantiating New Master Sites 11-39Data Dictionary Views 11-40Diagnosing Problems with New Master Sites 11-41Summary 11-42Practice 11 Overview 11-43

12 Materialized ViewsObjectives 12-2Overview 12-3Materialized Views 12-4Refreshing Materialized Views 12-5Complete Refresh 12-6Fast Refresh 12-7Force Refresh 12-8Triggering a Refresh Operation 12-9Manual Refresh 12-10Materialized View Logs 12-11Primary Key Materialized Views 12-14ROWID Materialized Views 12-15Object Materialized Views 12-16Creating Data Subsets with Materialized Views 12-17Materialized View Subset Types 12-18Row Subsets for Materialized Views 12-19Column Subsets for Updatable Materialized Views 12-20Many-To-One Subquery Subsets 12-21One-To-Many Subquery Subsets 12-22Many-To-Many Subquery Subsets 12-23

xi

Page 18: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Data Subsets with a Multilevel Subquery 12-24Data Subsets with Multitier Materialized Views 12-25Complex Materialized Views 12-26Complex Materialized Views: Rules 12-27Comparison between Simple and Complex Materialized Views 12-28Updatable Materialized Views 12-29Features of Updatable Materialized Views 12-31Updatable Materialized View Limitations 12-32Deferred Constraints for Updatable Materialized Views 12-33Updatable Materialized View Components 12-34Updatable Materialized View Architecture 12-35Updatable Materialized View Updating 12-38Propagating Changes to the Master Table 12-39Refreshing an Updatable Materialized View 12-40Data Flow in a Hybrid Replication System 12-41Multitier Materialized Views 12-42Master Materialized View Architecture 12-44Master Materialized Views 12-45Updatable Multitier Materialized View Restrictions 12-46Multitier Materialized Views and Conflict Resolution 12-47For More Information 12-48Summary 12-49Practice 12 Overview 12-50

13 Creating and Managing Materialized ViewsObjectives13-2Materialized View Implementation Steps 13-3Materialized View Implementation: Design 13-4Preparing the Master Site 13-5Granting Privileges to Accounts at Master Sites 13-6Materialized View Implementation: Creating a Materialized View Log 13-9Creating Materialized View Logs 13-10Materialized View Site Configuration 13-11Preparing the Materialized View Site: Creating Accounts 13-12Assigning Privileges 13-13DBMS_REPCAT_ADMIN. GRANT_ADMIN_ANY_SCHEMA 13-14DBMS_DEFER_SYS. REGISTER_PROPAGATOR 13-15

xii

Page 19: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Creating Database Links at the Materialized View Site 13-16Scheduling Push and Purge Jobs at the Materialized View Site 13-17Materialized View Implementation: Creating the Materialized View 13-18Examples of Creating Materialized Views 13-19Materialized View Implementation: Examples of Refresh Intervals 13-20Materialized View Implementation: Specifying Rollback Segments 13-21Materialized View Implementation: Granting Access Privileges 13-22Materialized View Registration 13-23The DBA_REGISTERED_MVIEWS View 13-26Monitoring Refresh Operations 13-27Database Configuration for Master Materialized Views 13-28Creating Multitier Materialized Views 13-30Multitier Materialized View Administration 13-32Multitier Materialized View Registration 13-33Creating Materialized View Sites with OEM 13-34Creating the Materialized View Administrators 13-35Creating Schemas at the Materialized View Site 13-36Specifying Options for the Push Job 13-37Materialized View Log Storage Considerations 13-38Materialized View Log Types 13-39Materialized View Log Filter Columns 13-40Troubleshooting Fast Refreshable Materialized View Creation Errors 13-41The EXPLAIN_MVIEW Procedure 13-42MV_CAPABILITIES_TABLE 13-45EXPLAIN_MVIEW Procedure Results 13-46Materialized View Data Dictionary Views 13-47Diagnosing Problems with Materialized View Logs 13-48Purging Materialized View Logs 13-49Reorganizing Materialized View Logs 13-52Reorganizing Master Tables with Materialized View Logs 13-53Reorganizing Master Tables: Example 13-54Other Data Dictionary Views with Information about Materialized Views 13-55Summary 13-56Practice 13 Overview 13-57

14 Using Materialized View Groups and Refresh GroupsObjectives 14-2Master Group Definition 14-3Materialized View Group Definition 14-4Replication Groups for Materialized View (MView) Sites 14-5MView Group Creation 14-6

xiii

Page 20: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Creating a Master Replication Group 14-7Adding a Master Table to the Master Group 14-8Creating a Materialized View Replication Group 14-9Creating Updatable Materialized Views 14-10Creating Objects in a Materialized View Group 14-11Materialized View Refresh Groups 14-13Refresh Groups 14-14Refresh Groups for Materialized View Sites 14-15Creating a Refresh Group 14-16Adding Materialized Views to a Refresh Group 14-19Refreshing Materialized Views in a Group 14-20Refreshing a Materialized View Group: Examples 14-21Using Oracle Enterprise Manager (OEM) 14-22Step 1: Select Target Master Site 14-23Step 2: Select Target Master Groups 14-24Step 3: Select Master Objects 14-25Step 4: Set Materialized View Defaults 14-26Step 5: Optional Customization 14-27Step 6: Review Setup to Finish 14-28Monitoring Materialized Views with OEM 14-29Creating Refresh Groups with OEM 14-30Materialized View Refresh Groups 14-31Troubleshooting Problems with Materialized View Refreshing 14-32Rollback Segments and Refreshing 14-33Summary 14-34Practice 14 Overview 14-35

15 Resynchronizing Datain a Replication SystemObjectives 15-2Replicated Database Recovery 15-3Media Failure in a Replication Site 15-4Incomplete Recovery of Replicated Objects 15-5Unsynchronized Replicated Tables 15-6Determining Differences Between Replicated Tables 15-7DIFFERENCES Procedure 15-8RECTIFY Procedure 15-10Example of Resolving Table Differences 15-11Resolving Table Differences 15-12Usage Guidelines 15-19

xiv

Page 21: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Modifying Replicated Tables 15-20Error Transactions 15-24Unresolved Errors 15-25DBMS_DEFER_QUERY.GET_XX_ARG Example 15-29Querying DEFERROR with OEM15-30Manually Resolving Errors 15-31Methods of Instantiation 15-33Steps Used for Offline Instantiation of a Deployment Template 15-34Steps Used for Offline Instantiation of a Materialized View Site 15-35Changing the Master Site for a Materialized View Group 15-36Summary 15-38Practice 15-1 Overview 15-39Practice 15-2 Overview 15-40

16 Creating Deployment TemplatesObjectives 16-2Deployment Template Concepts 16-3Components of Deployment Templates 16-4Using Deployment Templates 16-5Online Instantiation 16-6Offline Instantiation 16-7Supported Materialized View Types 16-8Deployment Template Design: Creating Column Subsets 16-9Deployment Template Design: Adding Objects 16-11Deployment Template Design: Example 16-12Deployment Template Design: Checklist 16-14Flowchart for Using Deployment Templates 16-15Creating Deployment Templates with OEM 16-16Step 1: Create Deployment Template 16-17Step 2: Add Materialized Views 16-18Step 3: Choose Subsetting Options 16-19Step 4: Apply Row Subsetting 16-20Step 5: Define Parameters 16-21Step 5: Define Parameters 16-23Step 6: Apply Column Subsetting 16-24Step 7: Add Objects to Deployment Template 16-25Step 8: Summary 16-26Authorizing Users for a Private Template 16-27Viewing Deployment Templates 16-28Packaging the Deployment Template 16-29Step 1: Select Template and Template Type 16-31

xv

Page 22: Oracle9i Database: Advanced Replication - ФОРСedu.fors.ru/toc/db/D12625GC10_TOC.pdf · • Oracle9i Database Administration Fundamentals I • Oracle9i Database Administration

Step 2: Specify Materialized View Proxy 16-32Step 3: Select Users 16-33Step 4: Specify Parameter Values 16-34Step 5: Set the Refresh Schedule 16-35Step 6: Select Schemas 16-36Step 7: Template Script Generation 16-37Instantiating the Deployment Template at the Materialized View Site 16-38Offline Instantiation 16-40Refreshing after Offline Instantiation 16-41Altering Deployment Templates Before Instantiation 16-42Copying Deployment Templates 16-43Comparing Deployment Templates 16-44Local Materialized View Control 16-45Summary 16-46Practice 16 Overview (Optional) 16-47

17 Procedural ReplicationObjectives 17-2Procedural Replication 17-3Guidelines for Using Procedural Replication 17-4Procedural Replication Sequence of Events 17-6Creating Procedural Replication 17-7Example of Procedural Replication 17-13Restrictions for Procedural Replication 17-15Summary 17-16Practice 17 Overview 17-17

A PracticesB Solutions

xvi


Recommended