Replication Guide and Reference

Table of Contents

  • About this book
    Who should read this book
    How this book is structured
    Conventions
    Terminology
    How to read syntax diagrams
    Road map
    How to send your comments

  • What's new
    Compatibility
    What's new for Version 7
    DATALINK replication
    Replication for AS/400
    Replication for UNIX, Windows, and OS/2
    What's new for Version 6
    DB2 Satellite Edition
    Database currency
    Performance features
    Integration with DB2

    Introduction

  • Overview of data replication
    DB2 data replication components
    Control tables
    Logical servers
    Administration interfaces
    Change-capture mechanisms
    Apply program
    How the replication components communicate
    DB2 data replication concepts
    Replication sources
    Subscription sets and subscription-set members
    Apply qualifier
    Data manipulation
    Target tables
    Schedule for applying updates

  • Data replication configurations
    Overview of replication configurations
    Data distribution
    Data consolidation
    Update anywhere
    Occasionally connected
    Examples of replication configurations
    Archiving audit information
    Consolidating data from distributed databases
    Distributing data to remote sites
    Distributing IMS data to remote sites
    Accessing data continuously
    Replicating operational data to decision support systems
    Using target tables as sources of updates (update anywhere)
    Updating data on occasionally connected systems
    Retrieving data from a non-DB2 distributed data store
    Replicating operational data to a non-DB2 reports and query database

  • Data replication scenario
    Before you begin
    Planning this scenario
    Replication source
    Replication target
    Replication options
    Setting up the replication environment for this scenario
    Step 1: Customize control tables
    Step 2: Define a replication source
    Step 3: Define a subscription set and a subscription-set member
    Step 4: Configure the source database
    Step 5: Bind the Capture and Apply programs
    Step 6: Create a password file
    Step 7: Replicate the scenario data
    Operating in a replication environment
    Step 1: Update the source table
    Step 2: Prune the control tables
    Step 3: Stop the Capture and Apply programs

  • Data replication tasks
    Planning your replication requirements
    Setting up your replication environment
    Setting up the system
    Setting up the replication criteria
    Performing the initial replication
    Adding to your replication environment
    Copying your replication environment
    Operating in your replication environment

    Administration

  • Planning for replication
    Capacity planning
    Storage planning
    Database log and journal data
    Active log file size for Capture for VSE and VM and current receiver size for Capture for AS/400
    Target tables and control tables
    Spill files
    Network planning
    Connectivity
    Where to run the Apply program: push or pull configuration
    Data blocking for large volumes of changes
    Deciding what to replicate
    Subsetting columns and rows
    Replicating joins using views
    Replicating before and after images
    Renaming columns
    Creating computed columns
    Using stored procedures for before and after run-time processing
    Replicating large objects
    Replicating DATALINK values
    Key-update restrictions
    General restrictions for replication
    Capture triggers for non-IBM sources
    How the Capture triggers capture the data changes
    Capture Triggers and pre-existing triggers
    Staging data
    Attributes of CCD tables
    Using CCD tables as replication sources
    Pruning the CD and CCD tables
    Auditing data usage
    Planning for migration

  • Setting up your replication environment
    Using the DB2 Control Center to set up replication
    Configuring the Control Center for host RDBMSs
    Setting replication preferences in the DB2 Tools Settings notebook
    Customizing CD table, index, and tablespace names
    Using the DB2 DataJoiner Replication Administration tool to set up replication
    Installing DJRA
    Setting preferences
    Customizing DJRA
    Defining replication control tables
    Creating replication control tables using DJRA
    Customizing and running replication SQL files
    Setting up security for replication
    Authorization requirements for administration
    Authorization requirements for running the Capture program
    Authorization requirements for running the Apply program
    Defining replication sources
    Defining replication sources for update-anywhere replication
    Detecting conflicts
    Defining views as replication sources
    Enabling replication logical-partitioning-key support
    Defining CCD tables
    Defining replication subscription sets
    Defining subscription sets for update-anywhere replication
    Choosing a target-table type
    Defining the target-table structure: columns and rows
    Defining a subscription set with a user-defined table
    Defining SQL statements or stored procedures for the subscription set
    Data-sharing considerations
    Specifying a data-blocking value
    Data currency requirements
    Data consistency requirements
    Maintaining external CCD tables
    Loading target tables offline using DJRA
    Copying your replication configuration to another system
    Setting up the Capture program
    Specifying tuning parameters for the Capture program
    Restrictions when running the Capture program
    Setting up the Apply program
    Refreshing target tables with the ASNLOAD exit routine
    Using the ASNDONE exit routine
    Using the ASNDLCOPY exit routine
    Using the ASNDLCOPYD file-copy daemon
    Setting up DB2 DataJoiner

  • Operating DB2 DataPropagator
    Operating the Capture program
    Before you start the Capture program
    Starting or restarting the Capture program
    Operating the Apply program
    Improving Apply performance for Sybase or Microsoft SQL Server
    Performing regular database maintenance
    Monitoring the replication environment
    Resolving gaps between source and target tables
    Modifying your replication configuration
    Viewing or changing existing replication sources
    Removing replication sources
    Activating and deactivating subscription sets
    Cloning a subscription set to another server
    Viewing or changing an existing subscription set
    Removing subscription sets

  • Problem determination
    Problem determination scenario
    Problem determination for replication administration
    Problem determination for the Apply program
    Apply trail table
    Apply-program trace file
    Apply-program log file
    Problem determination for the Capture program
    Capture-program trace table
    Capture-program trace file
    Capture-program log file
    Other problem-determination facilities for the Capture program
    Problem determination for AS/400
    Gathering information about active jobs
    Determining if the journal job is started
    Collecting data for problem determination
    Using the Replication Analyzer
    Troubleshooting
    Problem-source identification questions

    Operations

  • Capture and Apply for AS/400
    Coexistence considerations
    Setting up the Capture and Apply programs
    Installing DB2 DataPropagator for AS/400
    Connecting to an AS/400 server
    Verifying and customizing your installation of DB2 DataPropagator for AS/400
    Specifying tuning parameters for Capture for AS/400
    Authorization requirements for running the Capture and Apply programs
    Granting authority
    Revoking authority
    Restrictions for running the Capture program
    The journal
    Remote journal function
    Creating journals for source tables
    Managing journals and journal receivers
    Defining replication sources and subscription sets
    Using a relative record number (RRN) as a primary key
    Operating Capture for AS/400
    Starting Capture for AS/400
    Determining the progress of the Capture program
    Scheduling Capture for AS/400
    Stopping Capture for AS/400
    Reinitializing Capture for AS/400
    Pruning the change data and unit-of-work tables and minimizing source server DASD usage
    Warm and cold starts
    How the Capture program processes journal entry types
    Operating Apply for AS/400
    Creating packages to use with remote systems
    Before you start the Apply program
    Starting Apply for AS/400
    Scheduling Apply for AS/400
    Stopping Apply for AS/400
    Additional Apply program operations
    Using the ASNDONE exit routine for AS/400
    Refreshing target tables with the ASNLOAD exit routine for AS/400

  • Capture and Apply for OS/390
    Setting up the Capture and Apply programs
    Applying DB2 maintenance
    Installing Capture and Apply for OS/390
    Configuring Capture and Apply for OS/390 after installing a new release of DB2
    Operating Capture for OS/390
    Restrictions for running the Capture program
    Starting Capture for OS/390
    Scheduling Capture for OS/390
    Stopping Capture for OS/390
    Suspending Capture for OS/390
    Resuming Capture for OS/390
    Reinitializing Capture for OS/390
    Pruning the change data and unit-of-work tables.
    Displaying captured log progress.
    Operating Apply for OS/390
    Starting Apply for OS/390
    Scheduling Apply for OS/390
    Stopping Apply for OS/390
    Rules for index types
    Using the DB2 ODBC Catalog
    Setting up the DB2 ODBC Catalog
    DB2 ODBC Catalog tables

  • Capture and Apply for UNIX platforms
    User ID requirements for running the Capture and Apply programs
    Setting up the Capture and Apply programs
    Configuring the Capture program for UNIX platforms
    Optional: Configuring the Apply program manually for UNIX platforms
    Other configuration considerations for UNIX-based components
    Setting up end-user authentication at the source server
    Operating Capture for UNIX platforms
    Restrictions for running the Capture program
    Scheduling Capture for UNIX platforms
    Setting environment variables for Capture for UNIX platforms
    Starting Capture for UNIX platforms
    Stopping Capture for UNIX platforms
    Suspending Capture for UNIX platforms
    Resuming Capture for UNIX platforms
    Reinitializing Capture for UNIX platforms
    Pruning the change data and unit-of-work tables.
    Displaying captured log progress.
    Operating Apply for UNIX platforms
    Before you start the Apply program
    Starting Apply for UNIX platforms
    Scheduling Apply for UNIX platforms
    Stopping Apply for UNIX platforms

  • Capture for VM and Capture for VSE
    Setting up the Capture program
    Operating Capture for VM and Capture for VSE
    Restrictions for running the Capture program
    Starting Capture for VM and VSE
    Stopping Capture for VM and VSE
    Suspending Capture for VM and VSE
    Resuming Capture for VM and VSE
    Reinitializing Capture for VM and VSE
    Pruning the change data and unit-of-work tables.
    Displaying captured log progress.

  • Capture and Apply for Windows and OS/2
    User ID requirements for running the Capture and Apply programs
    Setting up the Capture and Apply programs
    Configuring the Capture program for Windows and OS/2
    Optional: Configuring the Apply program manually for Windows and OS/2
    Setting up end-user authentication at the source server
    Setting up the NT Service Control Manager
    Operating Capture for Windows and Capture for OS/2
    Restrictions for running the Capture program
    Setting environment variables for Capture for Windows and OS/2
    Starting Capture for Windows and OS/2
    Scheduling Capture for Windows and OS/2
    Stopping Capture for Windows and OS/2
    Suspending Capture for Windows and OS/2
    Resuming Capture for Windows and OS/2
    Reinitializing Capture for Windows and OS/2
    Pruning the change data and unit-of-work tables.
    Displaying captured log progress.
    Operating Apply for Windows and OS/2
    Before you start the Apply program
    Starting Apply for Windows and OS/2
    Scheduling Apply for Windows and OS/2
    Stopping Apply for Windows and OS/2
    Replicating on demand (Windows 32-bit operating systems only)
    Using DB2 DataPropagator for Microsoft Jet
    The advantages of using DataPropagator for Microsoft Jet
    Data integrity considerations
    Terminology for DataPropagator for Microsoft Jet replication
    Setting up DataPropagator for Microsoft Jet replication
    Operating DataPropagator for Microsoft Jet
    Returning control to users with the ASNJDONE exit routine
    DataPropagator for Microsoft Jet control tables

    Reference information

  • Table structures
    Tables at a glance
    List of tables used at the source server
    List of tables used at the control server
    List of tables used at the target server
    Tables used at the source server
    Register table
    Register extension table for AS/400
    Pruning control table
    Tuning parameters table
    Capture enqueue table (VM and VSE specific)
    Warm start table
    Critical section table
    Prune lock table
    Trace table
    Apply-qualifier-cross-reference table (AS/400 specific)
    Register synchronization table
    Unit-of-work table
    Change data table
    Tables used at the control server
    Subscription set table
    Subscription-targets-member table
    Subscription columns table
    Subscription statements table
    Row-replica-target-list table (Microsoft Jet specific)
    Subscription-schema-changes table (Microsoft Jet specific)
    Subscription events table
    Apply trail table
    Apply job table (AS/400 specific)
    Tables used at the target server
    User copy table
    Point-in-time table
    Consistent-change-data table
    Replica table
    Base aggregate table
    Change aggregate table
    Row-replica table (Microsoft Jet specific)
    Conflict table (Microsoft Jet specific)
    Error information table (Microsoft Jet specific)
    Error messages table (Microsoft Jet specific)
    Error-side-information table (Microsoft Jet specific)
    Key string table (Microsoft Jet specific)
    Synchronization generations table (Microsoft Jet specific)

  • Capture and Apply messages
    Capture program messages
    Apply program messages

  • Replication messages for AS/400
    Apply for AS/400 messages
    Capture for AS/400 messages
    Other replication messages for AS/400

    Appendixes

  • Appendix A. Starting the Capture and Apply programs from within an application
    Starting the Capture program using a routine
    Starting the Apply program using a routine
    Sample routine that starts the Capture and Apply programs

  • Appendix B. Education and services for DB2 data replication
    Services
    Education

  • Appendix C. Notices
    Programming interface information
    Trademarks
    Trademarks of other companies

  • Glossary

  • Index

  • Contacting IBM
    Product information