You are previewing Oracle Streams 11g Data Replication.
O'Reilly logo
Oracle Streams 11g Data Replication

Book Description

Master Oracle Streams 11g Replication

Enable real-time information access and data sharing across your distributed framework using the expert information in this Oracle Press guide. Oracle Streams 11g Data Replication explains how to set up and administer a unified enterprise data sharing infrastructure. Learn how to capture, propagate, and apply database changes, transform data, and handle data conflicts. Monitoring, optimizing, and troubleshooting techniques are also covered in this comprehensive volume.

• Understand Oracle Streams components and architecture

• Gain in-depth knowledge about capturing, propagating, and applying data manipulation language (DML) and data definition language (DDL) changes

• Learn how to access and modify the contents of Logical Change Records

• Build custom procedures for data transformations

• Configure Oracle Streams replication for the database, schemas, and tables

• Tune Oracle Streams performance for improved throughput

• Manage and monitor Oracle Streams using Oracle Enterprise Manager Grid Control

• Learn from several practical examples and scripts

Table of Contents

  1. Cover Page
  2. Oracle Streams 11g Data Replication
  3. Copyright Page
  4. Dedication
  5. Contents
  6. Acknowledgments
  7. Introduction
  8. Part I Introduction to Oracle Streams
    1. 1 What Is Oracle Streams
      1. Information Flow in Oracle Streams
      2. Architectural Overview of Oracle Streams
        1. Capture
        2. Staging and Propagation
        3. Consumption
        4. Queues
        5. Streams Tag
        6. Rules and Rule Sets
        7. Instantiation
        8. LogMiner Data Dictionary
        9. Streams Data Dictionary
        10. NOLOGGING and UNRECOVERABLE Operations
        11. Supplemental Logging
        12. Logical Change Records
        13. Table Data Comparison
      3. Summary
    2. 2 Using Oracle Streams
      1. Data Replication
        1. Unidirectional (One-Way) Replication
        2. Bidirectional Replication
        3. N-Way (Peer-to-Peer) Replication
        4. Hub-and-Spoke Replication
        5. Replication with Non-Oracle Databases
      2. Data Warehouse Loading
      3. Data Auditing
      4. Data Protection
      5. Message Queuing
      6. Minimizing Downtime During Database Upgrades
      7. Minimizing Downtime During Maintenance Tasks
      8. Summary
  9. Part II Oracle Streams Concepts and Architecture
    1. 3 Streams Rules and Rule Sets
      1. Rules
        1. Evaluation Context
        2. Rule Condition
        3. Action Context
      2. Rule Sets
        1. Positive Rule Set
        2. Negative Rule Set
      3. Creating Rules and Rule Sets
        1. System-Created Rules and Rule Sets
        2. User-Created Rules and Rule Sets
        3. Rule Condition for Discarding Unsupported LCRs
      4. Procedures to Manage Rules and Rule Sets
      5. Summary
    2. 4 Capture Process
      1. Capture Process Types
        1. Local Capture Process
        2. Downstream Capture Process
      2. Capture Process Checkpoints and System Change Numbers
        1. Required Checkpoint SCN
        2. Maximum Checkpoint SCN
        3. First SCN
        4. Start SCN
        5. Captured SCN
        6. Last Enqueued SCN
        7. Applied SCN
        8. Source Reset Logs SCN
        9. Checkpoint Retention Time
      3. Creating the Capture Process
        1. Create the Local Capture Process
        2. Create the Downstream Capture Process
        3. Create the Synchronous Capture Process
        4. The Capture User
      4. Capture Process Components
      5. Capture Process Parameters
        1. Changing Capture Process Parameters
      6. What Changes Are Not Captured?
        1. Changes Not Captured by the Capture Process
        2. Changes Not Captured by the Synchronous Capture Process
        3. How to Check for Unsupported Objects
      7. NOLOGGING Operations
      8. Supplemental Logging
        1. What Needs Supplemental Logging
        2. Types of Supplemental Logging
        3. System-Created Supplemental Log Groups
      9. Summary
    3. 5 Staging and Propagation Process
      1. Queue Models
      2. Queue Types
        1. Typed Queue of ANYDATA Type
        2. Buffered Queue
        3. Persistent Queue
        4. Secure Queue
        5. Transactional Queue
        6. Nontransactional Queue
        7. Commit-Time Queue
      3. How Streams Clients Use Queues1
      4. Creating a Streams Queue
        1. Queues and Real Application Clusters
      5. Propagation
        1. Queue-to-Database Link Propagation
        2. Queue-to-Queue Propagation
        3. Directed Networks
        4. Creating the Propagation Process
        5. Propagation Rule Set and Rules
        6. Propagation Job and Schedule
        7. Combined Capture and Apply
      6. Summary
    4. 6 Apply Process
      1. Overview of the Apply Process
      2. Apply Process States
      3. Apply Process Components
        1. Reader Server
        2. Coordinator Process
        3. Server Process
      4. Apply User
      5. Creating the Apply Process
        1. Automatic Apply Process Creation
        2. Manual Apply Process Creation
      6. Apply Process Parameters
      7. Handling Triggers
      8. Handling Column Discrepancies
        1. Data Type Mismatch
        2. Fewer Columns at Destination
        3. More Columns at Destination
        4. Column Name Mismatch
        5. No Primary Key or Unique Key
      9. Handling Transaction Dependencies
        1. Object Dependency
        2. Value Dependency
      10. Message Processing by the Apply Process
        1. DML Handler
        2. DDL Handle
        3. Error Handler
        4. Precommit Handler
      11. What Changes Are Not Applied?
      12. Summary
    5. 7 Logical Change Records
      1. Row LCRs
      2. DDL LCRs
      3. Extra Attributes in LCRs
      4. Accessing LCR Contents
        1. Accessing Row LCR Contents
        2. Accessing DDL LCR Contents
      5. Modifying LCR Content
        1. Modifying Row LCR Contents
        2. Modifying DDL LCR Contents
      6. LCRs and LOB Data Types
      7. Summary
  10. Part III Oracle Streams Configuration
    1. 8 Configuring Oracle Streams for Data Replication
      1. Streams Configuration Methods
      2. Prerequisite Tasks
        1. Prepare the Databases
        2. Create Network Connectivity Between Databases
        3. Create the Streams Administrator Accoun
        4. Create Database Links
        5. Create Directory Objects
      3. Streams Configuration Using MAINTAIN Procedures
        1. Streams Replication at the Database Level
        2. Streams Replication at the Schema Level
        3. Streams Replication at the Table Level
        4. Streams Replication at the Tablespace Level
        5. Configuring the Downstream Capture Process Using MAINTAIN Procedures
        6. Monitoring the Progress of MAINTAIN Procedures
        7. Recovering from an Error in MAINTAIN Procedures
        8. Advantages of MAINTAIN Procedures
        9. Limitations of MAINTAIN Procedures
      4. Streams Configuration Using Custom Scripts
        1. Unidirectional Replication with the Local Capture Process
        2. Unidirectional Replication with the Downstream Capture Process
        3. Bidirectional Replication
        4. Replication from a Single Source to Multiple Destinations
        5. Replication Using Queue Forwarding
        6. Replication Using Apply Forwarding
        7. Replication Using the Synchronous Capture Process
        8. Hub-and-Spoke Replication
        9. N-Way Replication (Multimaster)
      5. Summary
    2. 9 Data Transformations
      1. Types of Rule-Based Transformations
        1. Declarative Rule-Based Transformations
        2. Custom Rule-Based Transformations
      2. Where to Use Rule-Based Transformations
      3. Finding the Rule Name
      4. Configuring Declarative Rule-Based Transformations
        1. Add Column Procedure
        2. Delete Column Procedure
        3. Keep Columns Procedure
        4. Rename Column Procedure
        5. Rename Schema Procedure
        6. Rename Table Procedure
      5. Rule-Based Transformations and DDL Replication
      6. Configuring Custom Rule-Based Transformations
        1. Custom Rule-Based Transformation for DDL LCRs
        2. Custom Rule-Based Transformation for Row LCRs
      7. Removing Rule-Based Transformations
        1. Removing Declarative Rule-Based Transformations
        2. Removing Custom Rule-Based Transformations
      8. Table Subset Rule Transformations
      9. Transformation Execution Order
      10. Summary
    3. 10 Handling Data Conflicts
      1. Type of Conflicts
        1. Delete Conflicts
        2. Update Conflicts
        3. Uniqueness Conflicts
        4. Foreign Key Conflicts
      2. How to Avoid Conflicts
        1. Avoiding Uniqueness Conflicts
        2. Avoiding Delete Conflicts
        3. Avoiding Update Conflicts
      3. Resolving Conflicts
      4. Using the Prebuilt Update Conflict Handler
        1. Using Column Lists
        2. Using Resolution Column
        3. Setting Up the Prebuilt Update Conflict Handler
        4. Listing Defined Update Conflict Handlers
        5. Modifying Update Conflict Handler
        6. Removing Update Conflict Handlers
      5. Stopping Conflict Detection for Non-Key Columns
      6. Custom Conflict Handlers
      7. Summary
  11. Part IV Oracle Streams Management
    1. 11 Managing and Monitoring Streams Replication
      1. Managing Streams Processes
        1. Managing the Capture Process
        2. Managing the Synchronous Capture Process
        3. Managing the Propagation Process
        4. Managing the Apply Process
      2. Monitoring Streams Processes
        1. Monitoring the Capture Process
        2. Monitoring the Propagation Process and Queues
        3. Monitoring the Apply Process
      3. Monitoring Transactions
        1. Monitoring the Alert Log File
      4. Split and Merge: Managing and Monitoring
        1. Automatic Split and Merge
        2. Manual Split and Merge
      5. Streams Performance Advisor
      6. Summary
    2. 12 Maintenance and Troubleshooting
      1. Expanding the Streams Environment
        1. Adding Objects to the Exiting Streams Environment
        2. Adding a Database to the Existing Streams Environment
      2. Removing Streams Configuration
        1. Removing Entire Streams Configuration
        2. Removing Specific Streams Configuration
      3. Troubleshooting Streams Processes
        1. Capture Process Troubleshooting
        2. Propagation Process Troubleshooting
        3. Apply Process Troubleshooting
      4. Streams Message Tracking
      5. Streams Health Check Report
      6. Data Comparison and Convergence
        1. Creating the Comparison
        2. Running the Comparison
        3. Listing the Comparison
        4. Converging from the Local Table to the RemoteTable
        5. Rechecking the Comparison
        6. Purging the Comparison
        7. Dropping the Comparison
      7. Summary
    3. 13 Streams Performance Considerations
      1. Streams Queue Spilling
      2. Apply Spilling
      3. Handling Large Transactions
        1. Streams Tag
        2. Procedural Replication
      4. Handling Long-Running Transactions
      5. Log Mining Activity
      6. Capture Process Considerations
        1. Parallelism
        2. Checkpoint Information
      7. Propagation Process Considerations
      8. Apply Process Considerations
        1. Tuning Apply Process Parameters
        2. Handling LOB Data Types
        3. Apply Rule Set
        4. Detecting Conflicts
      9. Bug Fixes
      10. Summary
    4. 14 Oracle Enterprise Manager Grid Control for Streams Replication
      1. Streams Configuration Wizards
      2. Creating Schema-Level Replication
        1. Step 1: Object Selection
        2. Step 2: Destination Options
        3. Step 3: Replication Options
        4. Step 4: Schedule Job
        5. Step 5: Review
      3. Monitoring and Managing the Streams Replication Environment
        1. Monitoring the Capture Process
        2. Monitoring the Propagation Process
        3. Monitoring the Apply Process
        4. Displaying Transaction Details: LogMiner Session
        5. Displaying Overview of Streams Components
        6. Displaying Streams Paths and Performance Analysis Data
        7. Managing Streams Processes
        8. Managing Apply Errors
      4. Streams Metrics and Alerts
      5. Summary
  12. Part V Appendixes
    1. A Oracle Streams Best Practices
      1. Oracle Patches
      2. ARCHIVELOG Mode and Archived Log Files
      3. Tablespace for Streams
      4. Streams Administrator User Account
      5. Streams Administrator Privileges
      6. Database Initialization Parameters
      7. Database Links
      8. Network Tuning
        1. Operating System Parameters
        2. Network Device Queue Size
        3. Oracle Net Parameters
      9. Heartbeat Table
      10. DDL Replication
      11. Establish Performance Goals
    2. B Oracle Streams Replication in a RAC Environment
      1. Archived Logs
      2. Streams Queues
      3. Queue-to-Queue Propagation
      4. Checking Queue Table and Streams Process Locations
      5. Creating Standby Redo Log Groups for Downstream Capture
    3. C Streams Health Check Report
      1. How to Run the Streams Health Check Script
      2. When to Run the Streams Health Check Script
      3. How to Use the Health Check Report
        1. Configuration
        2. Analysis
        3. Statistics
        4. Other Information
    4. D Data Dictionary Views for Streams Replication
      1. Views for Configuration and Administrative Tasks
      2. Views for Capture Process
      3. Views for Apply Process
      4. Views for Propagation Process
      5. Views for Rules and Rule Sets
      6. Views for Instantiation
      7. Views for Supplemental Logging
      8. Views for Handlers
      9. Views for Conflict Handlers
      10. Views for Transformations
      11. Views for LogMiner
      12. Views for Archived Log/Redo Log Files
      13. View for Transactions
      14. Views for Queues and Queue Table
    5. E References
  13. Index