Oracle8 Replication
Release 8.0

A58245-01

Library

Product

Index

Next

Contents

Title and Copyright Information

Send Us Your Comments

Preface

Overview of The Oracle8 Replication Manual
Audience
Knowledge Assumed of the Reader
How The Oracle8 Replication Manual Is Organized
Conventions Used in This Manual
Special Notes
Text of the Manual
Code Examples
Your Comments Are Welcome

1 Understanding Replication

What Is Replication?
Basic Replication
Advanced Replication
Basic Replication Concepts
Uses of Basic Replication
Read-Only Table Snapshots
Snapshot Refreshes
Other Basic Replication Options
Advanced Replication Concepts
Uses for Advanced Replication
Advanced Replication Configurations
Advanced Replication and Oracle's Replication Manager
Replication Objects, Groups, Sites, and Catalogs
Oracle's Advanced Replication Architecture
Replication Administrators, Propagators, and Receivers
Replication Conflicts
Unique Advanced Replication Options

2 Using Basic Replication

Quick Start: Building a Basic Replication Environment
A Simple Example
Preparing a Database for Snapshots
Necessary Schemas
Necessary Database Links
Planning for Snapshot Refreshes
Creating Snapshot Logs
Snapshot Log Names
Required Privileges
Timing of Snapshot Log Creation
Special Requirements for Primary Key Snapshots
Snapshot Log Storage Parameters
Special Requirements for Subquery Snapshots
Internal Mechanisms of Snapshot Log Creation
Creating Simple Snapshots
Snapshot Names
Required Privileges
Special Requirements for Primary Key Snapshots
Snapshot Refresh Settings
A Snapshot's Defining Query
Snapshot Storage Settings
Clustered Snapshots
Data Load Options
Creating Snapshots with Subqueries
Advanced Subsetting with Subqueries
Restrictions for Snapshots for Subquery
Creating Refresh Groups
Refresh Settings
Refresh Types
Rollback Segment Setting
Managing a Basic Replication Environment
Managing Snapshot Logs
Managing Read-Only Snapshots
Managing Snapshot Refreshes and Refresh Groups
Tuning Performance for Snapshots
Indexing Snapshots
Tuning Subquery Snapshots
Other Basic Replication Options
Complex Snapshots
ROWID Snapshots
Individual Snapshot Refreshes
Monitoring Basic Replication Environments

3 Using Multimaster Replication

Quick Start: Building a Multimaster Replication Environment
A Simple Example
Preparing for Multimaster Replication
The Replication Setup Wizard
Starting SNP Background Processes
Managing Scheduled Links
Creating a Scheduled Link
Editing a Scheduled Link
Viewing the Status of a Scheduled Link
Deleting a Scheduled Link
Purging a Site's Deferred Transaction Queue
Specifying a Site's Purge Schedule
Manually Purging a Site's Deferred Transaction Queue
Managing Master Groups
Creating a Master Group
Deleting a Master Group
Suspending Replication Activity for a Master Group
Resuming Replication Activity for a Master Group
Adding Objects to a Master Group
Altering Objects in a Master Group
Removing Objects from a Master Group
Adding a Master Site to a Master Group
Removing a Master Site from a Master Group
Generating Replication Support for Master Group Objects
Viewing Information About Master Groups
Other Master Site Administration Issues
Advanced Multimaster Replication Options
Planning for Parallel Propagation
Understanding Replication Protection Mechanisms

4 Using Snapshot Site Replication

Quick Start: Adding a Snapshot Site to an Advanced Replication System
A Simple Example
Preparing for Snapshot Site Replication
The Replication Setup Wizard
Planning Scheduled Links and Snapshot Refreshes
Starting SNP Background Processes
Managing Snapshot Logs
Creating a Snapshot Log
Altering a Snapshot Log
Deleting a Snapshot Log
Managing Snapshot Groups
Creating a Snapshot Group
Registering a Snapshot Group at its Master Site
Unregistering a Snapshot Group at its Master Site
Adding Objects to a Snapshot Group
Altering Objects in a Snapshot Group
Deleting Objects from a Snapshot Group
Editing a Snapshot Group
Deleting a Snapshot Group
Managing Snapshots
Creating a Snapshot
Creating Snapshots with Subqueries
Regenerating Replication Support for an Updatable Snapshot
Altering a Snapshot
Deleting a Snapshot
Managing Refresh Groups
Creating a Refresh Group
Adding Snapshots to a Refresh Group
Deleting Snapshots from a Refresh Group
Changing Refresh Settings for a Snapshot Group
Manually Refreshing a Group of Snapshots
Deleting a Refresh Group
Other Snapshot Site Administration Issues
Data Dictionary Views

5 Conflict Resolution

Introduction to Replication Conflicts
Understanding Your Data and Application Requirements
Types of Replication Conflicts
Avoiding Conflicts
Conflict Detection at Master Sites
Conflict Resolution
Conflict Resolution Methods
Overview of Conflict Resolution Configuration
Design and Preparation Guidelines for Conflict Resolution
Implementing Conflict Resolution
Configuring Update Conflict Resolution
Creating a Column Group
Adding and Removing Columns in a Column Group
Dropping a Column Group
Managing a Group's Update Conflict Resolution Methods
Prebuilt Update Conflict Resolution Methods
Using Priority Groups for Update Conflict Resolution
Using Site Priority for Update Conflict Resolution
Sample Timestamp and Site Maintenance Trigger
Configuring Uniqueness Conflict Resolution
Assigning a Uniqueness Conflict Resolution Method
Removing a Uniqueness Conflict Resolution Method
Prebuilt Uniqueness Resolution Methods
Configuring Delete Conflict Resolution
Assigning a Delete Conflict Resolution Method
Removing a Delete Conflict Resolution Method
Guaranteeing Data Convergence
Avoiding Ordering Conflicts
Minimizing Data Propagation for Update Conflict Resolution
Minimizing Communication Examples
Further Reducing Data Propagation
User-Defined Conflict Resolution Methods
Conflict Resolution Method Parameters
Resolving Update Conflicts
Resolving Uniqueness Conflicts
Resolving Delete Conflicts
Restrictions
Example User-Defined Conflict Resolution Method
User-Defined Conflict Notification Methods
Creating a Conflict Notification Log
Creating a Conflict Notification Package
Viewing Conflict Resolution Information

6 Administering a Replicated Environment

Advanced Management of Master and Snapshot Groups
Executing DDL Within a Master Group
Validating a Master Group
Relocating a Master Group's Definition Site
Changing a Snapshot Group's Master Site
Monitoring an Advanced Replication System
Managing Administration Requests
Managing Deferred Transactions
Managing Error Transactions
Managing Local Jobs
Database Backup and Recovery in Replication Systems
Performing Checks on Imported Data
Auditing Successful Conflict Resolution
Gathering Conflict Resolution Statistics
Viewing Conflict Resolution Statistics
Canceling Conflict Resolution Statistics
Deleting Statistics Information
Determining Differences Between Replicated Tables
DIFFERENCES
RECTIFY
Troubleshooting Common Problems
Diagnosing Problems with Database Links
Diagnosing Problems with Master Sites
Diagnosing Problems with the Deferred Transaction Queue
Diagnosing Problems with Snapshots
Updating The Comments Fields in Views

7 Advanced Techniques

Using Procedural Replication
Restrictions on Procedural Replication
Serialization of Transactions
Generating Support for Replicated Procedures
Using Synchronous Data Propagation
Understanding Synchronous Data Propagation
Adding New Sites to an Advanced Replication Environment
Altering a Master Site's Data Propagation Mode
Designing for Survivability
Oracle Parallel Server versus Advanced Replication
Designing for Survivability
Implementing a Survivable System
Snapshot Cloning and Offline Instantiation
Snapshot Cloning for Basic Replication Environments
Offline Instantiation of a Master Site in an Advanced Replication System
Offline Instantiation of a Snapshot Site in an Advanced Replication System
Security Setup for Multimaster Replication
Security Setup for Snapshot Replication
Alternative Security Setup for an Advanced Replication Snapshot Site
Avoiding Delete Conflicts
Using Dynamic Ownership Conflict Avoidance
Workflow
Token Passing
Locating the Owner of a Row
Obtaining Ownership
Applying the Change
Modifying Tables without Replicating the Modifications
Disabling the Advanced Replication Facility
Re-enabling the Advanced Replication Facility
Triggers and Replication
Enabling/Disabling Replication for Snapshots

8 Using Deferred Transactions

Listing Information about Deferred Transactions
Creating a Deferred Transaction
Security
Specifying a Destination
Initiating a Deferred Transaction
Deferring a Remote Procedure Call
Queuing a Parameter Value for a Deferred Call
Adding a Destination to the DEFDEFAULTDEST View
Removing a Destination from the DEFDEFAULTDEST View
Executing a Deferred Transaction
LOB Storage
DEFLOB View of Storage for RPC

9 Replication Management API Reference

Packages
Examples of Using Oracle's Replication Management API
Prerequisites to Consider
Replication Manager and Oracle Replication Management API
DBMS_DEFER Package
DBMS_DEFER.CALL
Purpose
Syntax
DBMS_DEFER.COMMIT_WORK
Purpose
Syntax
DBMS_DEFER.datatype_ARG
Purpose
DBMS_DEFER.TRANSACTION
Purpose
Syntax
DBMS_DEFER_QUERY Package
DBMS_DEFER_QUERY.GET_ARG_FORM
Purpose
Syntax
DBMS_DEFER_QUERY.GET_ARG_TYPE
Purpose
Syntax
DBMS_DEFER_QUERY.GET_CALL_ARGS
Purpose
Syntax
DBMS_DEFER_QUERY.GET_datatype_ARG
Purpose
Syntax
DBMS_DEFER_SYS Package
DBMS_DEFER_SYS.ADD_DEFAULT_DEST
Purpose
Syntax
DBMS_DEFER_SYS.DELETE_DEFAULT_DEST
Purpose
Syntax
DBMS_DEFER_SYS.DELETE_DEF_DESTINATION
Purpose
Syntax
DBMS_DEFER_SYS.DELETE_ERROR
Purpose
Syntax
DBMS_DEFER_SYS.DELETE_TRAN
Purpose
Syntax
DBMS_DEFER_SYS.DISABLED
Purpose
Syntax
DBMS_DEFER_SYS.EXCLUDE_PUSH
Purpose
Syntax
DBMS_DEFER_SYS.EXECUTE_ERROR
Purpose
Syntax
DBMS_DEFER_SYS.EXECUTE_ERROR_AS_USER
Purpose
Syntax
DBMS_DEFER_SYS.PURGE
Purpose
Syntax
DBMS_DEFER_SYS.PUSH
Purpose
Syntax
DBMS_DEFER_SYS.REGISTER_PROPAGATOR
Purpose
Syntax
DBMS_DEFER_SYS.SCHEDULE_PURGE
Purpose
Syntax
DBMS_DEFER_SYS.SCHEDULE_PUSH
Purpose
Syntax
DBMS_DEFER_SYS.SET_DISABLED
Purpose
Syntax
DBMS_DEFER_SYS.UNREGISTER_PROPAGATOR
Purpose
Syntax
DBMS_DEFER_SYS.UNSCHEDULE_PURGE
Purpose
Syntax
DBMS_DEFER_SYS.UNSCHEDULE_PUSH
Purpose
Syntax
DBMS_OFFLINE_OG Package
DBMS_OFFLINE_OG.BEGIN_INSTANTIATION
Purpose
Syntax
DBMS_OFFLINE_OG.BEGIN_LOAD
Purpose
Syntax
DBMS_OFFLINE_OG.END_INSTANTIATION
Purpose
Syntax
DBMS_OFFLINE_OG.END_LOAD
Purpose
Syntax
DBMS_OFFLINE_OG.RESUME_SUBSET_OF_MASTERS
Purpose
Syntax
DBMS_OFFLINE_SNAPSHOT Package
DBMS_OFFLINE_SNAPSHOT.BEGIN_LOAD
Purpose
Syntax
DBMS_OFFLINE_SNAPSHOT.END_LOAD
Purpose
Syntax
DBMS_RECTIFIER_DIFF Package
DBMS_RECTIFIER_DIFF.DIFFERENCES
Purpose
Syntax
Restrictions
DBMS_RECTIFIER_DIFF.RECTIFY
Purpose
Syntax
DBMS_REFRESH Package
DBMS_REFRESH.ADD
Purpose
Syntax
DBMS_REFRESH.CHANGE
Purpose
Syntax
DBMS_REFRESH.DESTROY
Purpose
Syntax
DBMS_REFRESH.MAKE
Purpose
Syntax
DBMS_REFRESH.REFRESH
Purpose
Syntax
DBMS_REFRESH.SUBTRACT
Purpose
Syntax
DBMS_REPCAT Package
DBMS_REPCAT.ADD_GROUPED_COLUMN
Purpose
Syntax
DBMS_REPCAT.ADD_MASTER_DATABASE
Purpose
Syntax
DBMS_REPCAT.ADD_PRIORITY_datatype
Purpose
Syntax
DBMS_REPCAT.ADD_SITE_PRIORITY_SITE
Purpose
Syntax
DBMS_REPCAT.ADD_conflicttype_RESOLUTION
Purpose
Syntax
DBMS_REPCAT.ALTER_MASTER_PROPAGATION
Purpose
Syntax
DBMS_REPCAT.ALTER_MASTER_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.ALTER_PRIORITY
Purpose
Syntax
DBMS_REPCAT.ALTER_PRIORITY_datatype
Purpose
Syntax
DBMS_REPCAT.ALTER_SITE_PRIORITY
Purpose
Syntax
DBMS_REPCAT.ALTER_SITE_PRIORITY_SITE
Purpose
Syntax
DBMS_REPCAT.ALTER_SNAPSHOT_PROPAGATION
Purpose
Syntax
DBMS_REPCAT.CANCEL_STATISTICS
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_COLUMN_GROUP
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_PRIORITY_GROUP/
DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_REPGROUP
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_REPSITES
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.COMMENT_ON_conflicttype_RESOLUTION
Purpose
Syntax
DBMS_REPCAT.CREATE_MASTER_REPGROUP
Purpose
Syntax
DBMS_REPCAT.CREATE_MASTER_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.CREATE_SNAPSHOT_REPGROUP
Purpose
Syntax
DBMS_REPCAT.CREATE_SNAPSHOT_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.DEFINE_COLUMN_GROUP
Purpose
Syntax
DBMS_REPCAT.DEFINE_PRIORITY_GROUP
Purpose
Syntax
DBMS_REPCAT.DEFINE_SITE_PRIORITY
Purpose
Syntax
DBMS_REPCAT.DO_DEFERRED_REPCAT_ADMIN
Purpose
Syntax
DBMS_REPCAT.DROP_COLUMN_GROUP
Purpose
Syntax
DBMS_REPCAT.DROP_GROUPED_COLUMN
Purpose
Syntax
DBMS_REPCAT.DROP_MASTER_REPGROUP
Purpose
Syntax
DBMS_REPCAT.DROP_MASTER_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.DROP_PRIORITY
Purpose
Syntax
DBMS_REPCAT.DROP_PRIORITY_GROUP
Purpose
Syntax
DBMS_REPCAT.DROP_PRIORITY_datatype
Purpose
Syntax
DBMS_REPCAT.DROP_SITE_PRIORITY
Purpose
Syntax
DBMS_REPCAT.DROP_SITE_PRIORITY_SITE
Purpose
Syntax
DBMS_REPCAT.DROP_SNAPSHOT_REPGROUP
Purpose
Syntax
DBMS_REPCAT.DROP_SNAPSHOT_REPOBJECT
Purpose
Syntax
DBMS_REPCAT.DROP_conflicttype_RESOLUTION
Purpose
Syntax
DBMS_REPCAT.EXECUTE_DDL
Purpose
Syntax
DBMS_REPCAT.GENERATE_REPLICATION_PACKAGE
Purpose
Syntax
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT
Purpose
Syntax
DBMS_REPCAT.GENERATE_REPLICATION_TRIGGER
Purpose
Syntax
Altering Propagation Mode
DBMS_REPCAT.GENERATE_SNAPSHOT_SUPPORT
PURPOSE
SYNTAX
DBMS_REPCAT.MAKE_COLUMN_GROUP
Purpose
Syntax
DBMS_REPCAT.PURGE_MASTER_LOG
Purpose
Syntax
DBMS_REPCAT.PURGE_STATISTICS
Purpose
Syntax
DBMS_REPCAT.REFRESH_SNAPSHOT_REPGROUP
Purpose
Syntax
DBMS_REPCAT.REGISTER_SNAPSHOT_REPGROUP
Purpose
Syntax
DBMS_REPCAT.REGISTER_STATISTICS
Purpose
Syntax
DBMS_REPCAT.RELOCATE_MASTERDEF
Purpose
Syntax
Usage Notes
DBMS_REPCAT.REMOVE_MASTER_DATABASES
Purpose
Syntax
DBMS_REPCAT.REPCAT_IMPORT_CHECK
Purpose
Syntax
DBMS_REPCAT.RESUME_MASTER_ACTIVITY
Purpose
Syntax
DBMS_REPCAT.SEND_AND_COMPARE_OLD_VALUES
Purpose
Syntax
DBMS_REPCAT.SET_COLUMNS
Purpose
Syntax
DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY
Purpose
Syntax
DBMS_REPCAT.SWITCH_SNAPSHOT_MASTER
Purpose
Syntax
DBMS_REPCAT.UNREGISTER_SNAPSHOT_REPGROUP
Purpose
Syntax
DBMS_REPCAT.VALIDATE
Purpose
Syntax
DBMS_REPCAT.WAIT_MASTER_LOG
Purpose
Syntax
DBMS_REPCAT_ADMIN Package
DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_SCHEMA
Purpose
Syntax
DBMS_REPCAT_ADMIN.GRANT_ADMIN_SCHEMA
Purpose
Syntax
DBMS_REPCAT_ADMIN.REVOKE_ADMIN_ANY_SCHEMA
Purpose
Syntax
DBMS_REPCAT_ADMIN.REVOKE_ADMIN_SCHEMA
Purpose
Syntax
DBMS_REPCAT_AUTH Package
DBMS_REPCAT_AUTH.GRANT_SURROGATE_REPCAT
Purpose
Syntax
DBMS_REPCAT_AUTH.REVOKE_SURROGATE_REPCAT
Purpose
Syntax
DBMS_REPUTIL Package
DBMS_REPUTIL.REPLICATION_OFF
Purpose
Syntax
DBMS_REPUTIL.REPLICATION_ON
Purpose
Syntax
DBMS_SNAPSHOT Package
DBMS_SNAPSHOT.BEGIN_TABLE_REORGANIZATION
Purpose
Syntax
DBMS_SNAPSHOT.END_TABLE_REORGANIZATION
Purpose
Syntax
DBMS_SNAPSHOT.I_AM_A_REFRESH
Purpose
Syntax
DBMS_SNAPSHOT.PURGE_LOG
Purpose
Syntax
DBMS_SNAPSHOT.REFRESH
Purpose
Syntax
DBMS_SNAPSHOT.REGISTER_SNAPSHOT
Purpose
Syntax
DBMS_SNAPSHOT.SET_I_AM_A_REFRESH
Purpose
Syntax
DBMS_SNAPSHOT.UNREGISTER_SNAPSHOT
Purpose
Syntax
Package Variables

10 Data Dictionary Views

Replication Catalog Views
REPGROUP View
REPCATLOG View
REPCOLUMN View
REPCOLUMN_GROUP View
REPCONFLICT View
REPDDL View
REPGENERATED View
REPGROUPED_COLUMN View
REPKEY_COLUMNS View
REPOBJECT View
REPPARAMETER_COLUMN View
REPPRIORITY View
REPPRIORITY_GROUP View
REPPROP View
REPRESOLUTION View
REPRESOL_STATS_CONTROL View
REPRESOLUTION_METHOD View
REPRESOLUTION_STATISTICS View
REPSITES View
REPGENOBJECTS View
Deferred Transaction Views
DEFCALL View
DEFCALLDEST View
DEFDEFAULTDEST View
DEFERRCOUNT View
DEFERROR View
DEFLOB View
DEFPROPAGATOR View
DEFSCHEDULE View
DEFTRAN View
DEFTRANDEST View
Snapshots and Snapshot Refresh Group Views
SNAPSHOTS View
REGISTERED_SNAPSHOTS View
SNAPSHOTS_LOGS View
SNAPSHOT_REFRESH_TIMES View
REFRESH View
REFRESH_CHILDREN View

A New Features

Performance Enhancements
Parallel Propagation of Deferred Transactions
Internalized Replication Triggers
Reduced Data Propagation
Data Subsetting Based on Subqueries
Large Object Datatypes (LOBs) Support
Improved Management and Ease of Use
Fine grained Quiesce
Primary Key Snapshots
Snapshot Registration at Master Sites
Reorganizing Tables With Capability of Fast Refresh
Support for Offline Instantiation
Deferred Constraints for Updatable Snapshots
Validate Procedure
Partitioned Tables and Indexes
Enhanced, System-Based Security Model
New Replication Manager Features

B Migration and Compatibility

Migration Overview
Migrating All Sites at Once
Incremental Migration
Preparing Oracle7 Master Sites for Incremental Migration
Incremental Migration of Snapshot Sites
Incremental Migration of Master Sites
Migration Using Export/ Import
Upgrading to Primary Key Snapshots
Primary Key Snapshots Conversion at Master Site(s)
Primary Key Snapshot Conversion at Snapshot Site(s)
Features Requiring Migration to Oracle8
Obsolete procedures


Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Index