O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

IBM InfoSphere Replication Server and Data Event Publisher

Book Description

Design, implement, and monitor a successful Q replication and Event Publishing project with IBM InfoSphere Replication Server and Data Event Publisher using this book and eBook

  • Covers the toolsets needed to implement a successful Q replication project

  • Aimed at the Linux, Unix, and Windows operating systems, with many concepts common to z/OS as well

  • A chapter dedicated exclusively to WebSphere MQ for the DB2 DBA

  • Detailed step-by-step instructions for 13 Q replication scenarios with troubleshooting and monitoring tips

  • Written in a conversational and easy to follow manner

  • In Detail

    Business planning is no longer just about defining goals, analyzing critical issues, and then creating strategies. You must aid business integration by linking changed-data events in DB2 databases on Linux, UNIX, and Windows with EAI solutions , message brokers, data transformation tools, and more. Investing in this book will save you many hours of work (and heartache) as it guides you around the many potential pitfalls to a successful conclusion.

    This book will accompany you throughout your Q replication journey. Compiled from many of author's successful projects, the book will bring you some of the best practices to implement your project smoothly and within time scales. The book has in-depth coverage of Event Publisher, which publishes changed-data events that can run updated data into crucial applications, assisting your business integration processes. Event Publisher also eliminates the hand coding typically required to detect DB2 data changes that are made by operational applications.

    We start with a brief discussion on what replication is and the Q replication release currently available in the market. We then go on to explore the world of Q replication in more depth. The latter chapters cover all the Q replication components and then talk about the different layers that need to be implemented—the DB2 database layer, the WebSphere MQ layer, and the Q replication layer. We conclude with a chapter on how to troubleshoot a problem. The Appendix (available online) demonstrates the implementation of 13 Q replication scenarios with step-by-step instructions.

    Publish changed data events in order to operate updated data into critical applications, thus helping your business integration processes with this professional guide

    Table of Contents

    1. IBM InfoSphere Replication Server and Data Event Publisher
      1. IBM InfoSphere Replication Server and Data Event Publisher
      2. Credits
      3. About the Author
      4. About the Reviewer
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Q Replication Overview
        1. Why do we want to replicate data
          1. Overview of what is available today
            1. The different replication options
          2. Replication toolset
            1. The Replication Center GUI
            2. The ASNCLP command interface
        2. Q replication constituent components
        3. The different types of Q replication
          1. Unidirectional replication
          2. Replicating to a stored procedure
          3. Bidirectional replication
          4. Peer-to-peer replication
          5. Tree replication
          6. Replicating to a Consistent Change Data table
          7. Event Publishing
        4. DB2 replication sources
          1. Replicating XML data types
          2. Replicating compressed tables
          3. Replicating large objects
          4. Other DB2 objects
        5. Q replication filtering and transformations
          1. Filtering rows/columns
          2. Before and After SQL—alternatives
          3. Stored procedure processing
        6. Q replication conflict detection
          1. What is conflict detection?
          2. When do conflicts occur?
        7. Q replication and HADR
        8. Q replication in a DPF environment
          1. Tables with referential integrity
          2. Table load and insert considerations
        9. Summary
      7. 2. Q Replication Components
        1. The DB2 database layer
          1. Database/table/column name compatibility
        2. The WebSphere MQ layer
        3. The Q replication layer
          1. What is a logical table?
          2. What is a Replication/Publication Queue Map?
          3. What is a Q subscription?
          4. What is a subscription group?
          5. Q subscription activation
        4. The relationship between the components
        5. The Q Capture and Q Apply programs
          1. Q Capture internals
          2. Q Apply internals
          3. How do Q Capture and Q Apply communicate?
        6. Summary
      8. 3. The DB2 Database Layer
        1. Database creation
        2. The control tables
          1. The Q Capture control tables
          2. The Q Apply control tables
          3. The Replication Alert Monitor control tables
        3. Where do the control tables go
          1. DB2 to DB2 replication
          2. DB2 to non-DB2 replication
          3. Non-DB2 to DB2 replication
        4. How are the Q replication control tables populated
        5. Pruning of the control tables
        6. The IBMQREP_SIGNAL control table
          1. Sending signals using the IBMQREP_SIGNAL table
            1. Sending signals using an INSERT statement
            2. Sending signals using ASNCLP
            3. Using a signal to determine where Q Capture is up to
            4. Restricting access to IBMQREP_SIGNAL
        7. Summary
      9. 4. WebSphere MQ for the DBA
        1. An introduction to MQ
        2. MQ queues
          1. MQ queue naming standards
          2. MQ queues required for different scenarios
        3. WebSphere MQ commands
        4. Create/start/stop a Queue Manager
          1. Starting a Queue Manager
          2. Checking that the Queue Manager is running
          3. Stopping a Queue Manager
          4. Deleting a Queue Manager
          5. The Queue Manager configuration file
          6. MQ logging
        5. Issuing commands to a Queue Manager (runmqsc)
          1. Displaying the attributes of a Queue Manager
          2. Changing the attributes of a Queue Manager
        6. MQ Listener management
          1. Defining/Starting an MQ Listener
          2. Displaying an MQ Listener
          3. Stopping an MQ Listener
        7. MQ Channel management
          1. To define a Channel
          2. To start a Channel
          3. To display a list of Channels
          4. To display the status of a Channel
          5. To stop a Channel
        8. MQ Queue management
          1. To define a Local Queue
          2. To display the attributes of a Local Queue
          3. To alter the attributes of a Queue
          4. To empty a Local Queue
          5. To delete a Local Queue
          6. To define a Remote Queue
          7. To define a Model Queue
          8. To define a Transmission Queue
          9. To list Queues
        9. WebSphere MQ sample programs—server
          1. To put a message onto a Queue (amqsput)
          2. To retrieve a message from a Queue (amqsget)
          3. To browse a message on a Queue
        10. WebSphere MQ sample programs—client
        11. Dead Letter Queue handler (runmqdlq)
        12. WebSphere MQ message format
        13. MQ error messages
        14. Summary
      10. 5. The ASNCLP Command Interface
        1. The ASNCLP environment
        2. The ASNCLP commands
          1. Setting up the administration environment
          2. Setting the environment session
          3. Comments in an ASNCLP script
          4. Possible header lines in a script
        3. Common Q replication tasks
          1. Creating or dropping Q Capture control tables on DB2A
          2. Creating or dropping Q Apply control tables on DB2B
          3. Creating Q Capture and Q Apply control tables in the same database
          4. Queue Map maintenance
            1. Creating a Replication Queue Map
            2. Creating a Publication Queue Map
            3. Dropping a Queue Map
            4. Altering a Replication Queue Map
          5. Creating Q subscriptions and Publications
            1. Q subscription for unidirectional replication
            2. Q subscription for bidirectional replication
            3. Q subscription for P2P two-way replication
            4. Q subscription for P2P three-way replication
            5. Publication for Event Publishing
          6. Q subscription maintenance
            1. Checking the state of a Q subscription
            2. Stopping a Q subscription
            3. Dropping a Q subscription
            4. Altering a Q subscription
            5. Starting a Q subscription
            6. Sending a signal using ASNCLP
          7. Validating the WebSphere MQ environment
            1. Validating WSMQ for the Capture schema
            2. Validating WSMQ for the Apply schema
            3. Validating a Replication Queue Map
            4. Validating a Publication Queue Map
            5. Validating a Q subscription
            6. Validation error messages
        4. Summary
      11. 6. Administration Tasks
        1. Defining the MQ queues
        2. Create/drop the Q replication control tables
          1. Create/drop the Q Capture control tables
          2. Create/drop the Q Apply control tables
        3. Registering a table for Q replication
        4. Managing Queue Maps
          1. Creating a Queue Map
          2. Altering a Replication Queue Map
          3. Drop/delete a Queue Map
          4. Listing the RQM for a Receive Queue
        5. Q subscription maintenance
          1. Creating a Q subscription
          2. Altering a Q subscription
          3. Dropping a Q subscription
          4. Reinitializing a Q subscription
          5. Checking the status of a Q subscription
          6. Stopping a Q subscription
          7. Determining when a Q subscription became inactive
          8. Listing the attributes of a Q subscription
          9. Listing all Q subscriptions using a RQM
          10. Specifying a table as the initial load source
        6. Source table maintenance
          1. Adding a column to a Q subscription
          2. Removing a column from a replicated source table
          3. Altering the column attributes of a replicated source table
          4. Performing a reorganization on the source table
          5. Collecting statistics on the source table
          6. Performing a load on the source table
          7. Importing data into the source table
        7. Adding a new source table to Q replication
        8. Stop replicating (remove) a table
        9. Administrative commands/tasks
        10. Viewing messages using asnqmfmt
          1. Retrieving Q Capture Restart Queue information
        11. Q Capture and Q Apply administration
        12. Q Capture administration
          1. Starting Q Capture
          2. Stopping Q Capture
          3. Querying the status of Q Capture
          4. Altering a running Q Capture
          5. Starting Q Capture from a point in the DB2 log
          6. Starting Q Capture without triggering a load
          7. Taking a Q Capture trace (asntrc)
        13. Q Apply administration
          1. Starting Q Apply
          2. Stopping Q Apply
          3. Querying the status of Q Apply
          4. Starting a Receive Queue
        14. The password file
        15. Copying (promoting) Q replication environments
          1. The ASNCLP PROMOTE procedure
        16. Summary
      12. 7. Monitoring and Reporting
        1. The database layer
        2. The WebSphere MQ layer
          1. Checking that the Queue Managers are running
          2. Checking the state of the Listeners
          3. Checking the state of the Channels
          4. Checking the state of the Receive Queue
          5. Checking that the Q subscription is active
        3. The Q replication layer
          1. Monitoring Q Capture start up
          2. Monitoring Q Apply start up
          3. Checking that Q Capture and Q Apply are active
          4. Checking the Q Capture and Q Apply log files
          5. Checking the APPLYTRACE and CAPTRACE tables
          6. How far is Q Capture behind the DB2 log
          7. How far is Q Apply behind Q Capture
          8. Listing Q subscription status
          9. Listing Receive Queue status
          10. Table synchronization
          11. The different latencies
          12. The base monitor tables
            1. The Q Capture tables
            2. The Q Apply tables
          13. Collection of data for historical analysis
          14. Historical monitoring of Q Capture
          15. Historical monitoring of Q Apply
          16. To determine the row throughput
        4. Manual monitoring
        5. Monitoring using the Replication Alert Monitor
          1. Q Capture alert conditions
          2. Q Apply alert conditions
          3. Creating the RAM control tables
          4. Setting up e-mail notification
          5. Monitoring Q Capture
          6. Monitoring Q Apply
          7. Starting the Replication Alert Monitor
          8. Monitor management
          9. Checking which monitors are active
          10. Changing or reinitializing a monitor
          11. Stopping a monitor
          12. Suspending or resuming a monitor
          13. The ibmsnap_alerts table
        6. Other tools available to monitor Q replication
          1. The database layer
            1. Optim Data Studio
            2. The DB2 Health Center
          2. The WebSphere MQ layer
            1. The WebSphere MQ Explorer
            2. The WebSphere MQSC interface (runmqsc)
            3. The rfhutil utility
          3. The Q replication layer
            1. The Replication Dashboard
            2. Tivoli Monitoring
        7. The asnqanalyze command
        8. Some what happens if ... scenarios
          1. If MQ is stopped on each server
          2. If the Receive Queue is stopped
          3. If Q Apply is not running
          4. If the Q Apply Queue Manager is not running
          5. If the Receive Queue fills up
          6. If the Q Apply Dead Letter Queue fills up
            1. If a Dead Letter Queue has not been defined
            2. What happens if—summary diagram
        9. Q replication performance considerations
          1. The DB2 database layer
          2. The WebSphere MQ layer
          3. Q Capture
          4. Q Apply
        10. Some error messages
          1. Q Capture: ASN0569E on starting
          2. Q Capture: ASN7094E
          3. Q Apply: hangs when starting
        11. How to handle an ASN7551E message
          1. Q Apply: ASN7094E
          2. Q Apply: ASN7505E
        12. Summary