You are previewing High Availability and Disaster Recovery Options for DB2 for Linux, UNIX, and Windows.
O'Reilly logo
High Availability and Disaster Recovery Options for DB2 for Linux, UNIX, and Windows

Book Description

As organizations strive to do more with less, IBM® DB2® for Linux, UNIX, and Windows provides various built-in high availability features. DB2 further provides high availability solutions by using enterprise system resources with broad support for clustering software, such as IBM PowerHA® SystemMirror®, IBM Tivoli® System Automation for Multiplatforms (Tivoli SA MP), and Microsoft Windows Cluster Server.

This IBM Redbooks® publication describes the DB2 high availability functions and features, focusing on High Availability Disaster Recovery (HADR) in the OLTP environment. The book provides a detailed description of HADR, including setup, configuration, administration, monitoring, and preferred practices.

This book explains how to configure Cluster software PowerHA, Tivoli SA MP, and MSCS with DB2 and show how to use these products to automate HADR takeover.

DB2 also provides unprecedented enterprise-class disaster recovery capability. This book covers single system view backup, backup and restore with snapshot backup, and the db2recovery command, in detail.

This book is intended for database administrators and information management professionals who want to design, implement, and support a highly available DB2 system.

Table of Contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. Preface
    1. The team who wrote this book
    2. Now you can become a published author, too!
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  4. Summary of changes
    1. October 2012, Third Edition
  5. Chapter 1. DB2 high availability and disaster recovery overview
    1. 1.1 Introduction
      1. 1.1.1 High availability
      2. 1.1.2 Disaster recovery
    2. 1.2 High availability solutions with DB2
      1. 1.2.1 High Availability Disaster Recovery (HADR)
      2. 1.2.2 DB2 high availability (HA) feature
      3. 1.2.3 High availability through disk mirroring
      4. 1.2.4 High availability through log shipping
      5. 1.2.5 Automatic client reroute
    3. 1.3 Disaster recovery solutions with DB2
      1. 1.3.1 Backup and recovery options
      2. 1.3.2 High Availability Disaster Recovery (HADR)
      3. 1.3.3 Replication
      4. 1.3.4 InfoSphere Change Data Capture (CDC)
      5. 1.3.5 Remote disk mirroring
  6. Chapter 2. DB2 with IBM Tivoli System Automation for Multiplatforms
    1. 2.1 Overview
      1. 2.1.1 Tivoli SA MP components
      2. 2.1.2 Terminology of Tivoli SA MP
    2. 2.2 How DB2 works with Tivoli SA MP
      1. 2.2.1 How Tivoli SA MP detects failures
    3. 2.3 Planning the high availability cluster
    4. 2.4 Setting up Tivoli SA MP with DB2 10.1 on AIX
      1. 2.4.1 Planning the cluster domain
      2. 2.4.2 Installing Tivoli SA MP
      3. 2.4.3 Configuration of Tivoli SA MP and DB2
    5. 2.5 Administration
      1. 2.5.1 The node maintenance scenario
    6. 2.6 Cluster maintenance
      1. 2.6.1 Deleting a domain
    7. 2.7 Testing
      1. 2.7.1 Operating system failure
      2. 2.7.2 Power failure
      3. 2.7.3 Network failure
      4. 2.7.4 DB2 instance failure
  7. Chapter 3. DB2 and PowerHA SystemMirror
    1. 3.1 Overview
    2. 3.2 How DB2 works with PowerHA
    3. 3.3 Planning the PowerHA cluster
    4. 3.4 Setting up the PowerHA cluster
      1. 3.4.1 PowerHA cluster setup planning
      2. 3.4.2 PowerHA configuration
    5. 3.5 Considerations for db2nodes.cfg file
      1. 3.5.1 Modifying the file entry in the start script
      2. 3.5.2 Running the db2start command with the restart option
      3. 3.5.3 Running the db2gcf command with the -u option
      4. 3.5.4 Using an alias in the hosts file
    6. 3.6 Tuning tips for quick failover
      1. 3.6.1 Failover of the resources
  8. Chapter 4. DB2 with Microsoft Windows Failover Cluster
    1. 4.1 Failover Cluster concepts
      1. 4.1.1 Failover Cluster overview
      2. 4.1.2 Windows Failover Cluster definitions
      3. 4.1.3 Managing Failover Cluster
    2. 4.2 Minimal steps to cluster a DB2 instance
    3. 4.3 Creating a server cluster
      1. 4.3.1 Validating your system
      2. 4.3.2 Creating a cluster in the domain
    4. 4.4 Installing DB2
    5. 4.5 Creating a DB2 instance
    6. 4.6 Manually configuring a DB2 instance
      1. 4.6.1 Adding the DB2 resource type
      2. 4.6.2 Creating cluster resources
      3. 4.6.3 Migrating the DB2 instance to the cluster environment
      4. 4.6.4 Adding a reference to the instance in the other nodes
      5. 4.6.5 Configuring security settings
    7. 4.7 Using db2mscs to configure a DB2 instance
    8. 4.8 Testing a cluster
      1. 4.8.1 Creating a SAMPLE database
      2. 4.8.2 Verifying the DB2 instance communication settings
      3. 4.8.3 Connecting to the database using Data Studio
      4. 4.8.4 Testing failover
    9. 4.9 Upgrading your instance
  9. Chapter 5. DB2 HADR introduction
    1. 5.1 HADR overview
      1. 5.1.1 HADR topology
      2. 5.1.2 HADR synchronization modes
    2. 5.2 HADR architecture
    3. 5.3 Terminology
  10. Chapter 6. HADR setup
    1. 6.1 Requirements for setting up HADR
      1. 6.1.1 Requirements
      2. 6.1.2 Parameters
    2. 6.2 Setup and configuration
      1. 6.2.1 Preparing the environment
      2. 6.2.2 Configuration using the HADR setup wizard
      3. 6.2.3 Command-line setup
      4. 6.2.4 Setting up HADR with multiple standby servers
      5. 6.2.5 HADR log spooling
    3. 6.3 Basic operation
      1. 6.3.1 Starting and shutting down
      2. 6.3.2 Planned takeover
      3. 6.3.3 Takeover by force
    4. 6.4 Troubleshooting
      1. 6.4.1 During setup
      2. 6.4.2 After setup or during normal execution
      3. 6.4.3 After an HADR disconnects or server failure occurs
      4. 6.4.4 Considerations while running HADR
      5. 6.4.5 Re-establishing HADR after failure
  11. Chapter 7. HADR with clustering software
    1. 7.1 Overview: Why clustering software is needed
      1. 7.1.1 What is clustering software
      2. 7.1.2 How HADR works in an environment with clustering software
      3. 7.1.3 What resources should be taken over
    2. 7.2 db2haicu
      1. 7.2.1 Prerequisites
      2. 7.2.2 Usage
      3. 7.2.3 Considerations
      4. 7.2.4 Troubleshooting
    3. 7.3 DB2 HADR with Tivoli SA MP configuration for automatic failover on an AIX system
      1. 7.3.1 Architecture
      2. 7.3.2 Configuration
      3. 7.3.3 Administration
      4. 7.3.4 Unplanned outages
    4. 7.4 DB2 HADR with Tivoli SA MP configuration for automatic failover on a Linux system
      1. 7.4.1 Architecture
      2. 7.4.2 Configuration
      3. 7.4.3 Testing
      4. 7.4.4 Administration
    5. 7.5 Automating HADR takeover with PowerHA
      1. 7.5.1 PowerHA and HADR planning
      2. 7.5.2 Step-by-step configuration overview
      3. 7.5.3 HADR setup
      4. 7.5.4 PowerHA configuration
      5. 7.5.5 Preparing the application server scripts
      6. 7.5.6 Joint test for HADR and PowerHA
  12. Chapter 8. HADR monitoring
    1. 8.1 Introduction to HADR monitoring
    2. 8.2 The db2pd command
    3. 8.3 The MON_GET_HADR table function
    4. 8.4 HADR monitoring information
  13. Chapter 9. DB2 and system upgrades
    1. 9.1 General steps for upgrades in a HADR environment
    2. 9.2 DB2 fix pack rolling upgrades
      1. 9.2.1 Rolling upgrade on Linux
    3. 9.3 DB2 upgrade
      1. 9.3.1 DB2 version upgrade on Linux
    4. 9.4 Rolling operating system and DB2 configuration parameter updates
      1. 9.4.1 Procedure
  14. Chapter 10. Automatic client reroute
    1. 10.1 ACR overview
      1. 10.1.1 ACR with HADR
      2. 10.1.2 ACR in action
    2. 10.2 ACR tuning
    3. 10.3 ACR limitations
    4. 10.4 ACR configuration examples
      1. 10.4.1 ACR with a non-HADR database
      2. 10.4.2 ACR with a HADR database
      3. 10.4.3 ACR with a HADR database and PowerHA
    5. 10.5 Application programming to handle ACR
      1. 10.5.1 ACR support for Java applications
      2. 10.5.2 Implementing ACR on the DataSource interface with JDBC
      3. 10.5.3 ACR exception handling in Java applications
  15. Chapter 11. HADR configuration parameters and registry variables
    1. 11.1 DB2 HADR configuration parameters
      1. 11.1.1 Basic configuration parameters
      2. 11.1.2 Automatic client reroute configuration parameters
    2. 11.2 DB2 HADR registry variables
    3. 11.3 Considerations
      1. 11.3.1 DB2 transaction performance
      2. 11.3.2 How to reduce takeover time
      3. 11.3.3 Seamless takeover
      4. 11.3.4 Performance implications of HADR_TIMEOUT
      5. 11.3.5 Applications with a high logging rate
      6. 11.3.6 Network considerations
      7. 11.3.7 Network performance tips
      8. 11.3.8 Avoiding transaction loss in a HADR with HA cluster software
      9. 11.3.9 Avoiding transaction loss by using the peer window
      10. 11.3.10 Index logging
      11. 11.3.11 Read on the standby
      12. 11.3.12 Backup from standby image with FlashCopy
      13. 11.3.13 Replicating load data
      14. 11.3.14 Log archive and HADR
      15. 11.3.15 Database restore considerations
  16. Chapter 12. Backup and recovery
    1. 12.1 Single system view backup
      1. 12.1.1 Using single system view backup
      2. 12.1.2 Considerations
    2. 12.2 Backup and restore database with snapshot backup
    3. 12.3 Recover database command
      1. 12.3.1 Feature summary
    4. 12.4 Recovery object management
  17. Chapter 13. Q replication
    1. 13.1 Introduction to Q replication
    2. 13.2 Unidirectional setup
      1. 13.2.1 Starting Q capture
      2. 13.2.2 Start Q Apply
  18. Chapter 14. IBM InfoSphere Change Data Capture
    1. 14.1 Introduction
    2. 14.2 Architectural overview
      1. 14.2.1 InfoSphere CDC architecture
      2. 14.2.2 Transactional integrity and reliability
    3. 14.3 InfoSphere CDC topologies
      1. 14.3.1 Unidirectional replication
      2. 14.3.2 Bidirectional replication
      3. 14.3.3 Replication to other destinations
      4. 14.3.4 High availability and disaster recovery with InfoSphere CDC
    4. 14.4 Features and functionality
      1. 14.4.1 Transformations
      2. 14.4.2 Replication modes
      3. 14.4.3 Filtering
      4. 14.4.4 Conflict detection and resolution
  19. Chapter 15. Geographically dispersed high availability and disaster recovery solutions
    1. 15.1 PowerHA over extended distances
    2. 15.2 PowerHA data replication components
      1. 15.2.1 PowerHA with SAN Volume Controller mirroring
      2. 15.2.2 PowerHA with Geographical Logical Volume Manager
      3. 15.2.3 Geographical Logical Volume Manager
      4. 15.2.4 Synchronous and asynchronous data mirroring
    3. 15.3 Configuring a stand-alone GLVM
    4. 15.4 Manual failover
    5. 15.5 Configuring PowerHA with GLVM
  20. Appendix A. PowerHA application server scripts
    1. A.1 hadr_primary_takeover.ksh
    2. A.2 hadr_primary_stop.ksh
    3. A.3 hadr_monitor.ksh
  21. Appendix B. IBM Tivoli System Automation for Multiplatforms takeover scripts
    1. B.1 env file
    2. B.2 hadr_start.ksh
    3. B.3 hadr_stop.ksh
    4. B.4 hadr_monitor.ksh
    5. B.5 planned_takeover.ksh
    6. B.6 get_hadr_info.fnc
  22. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. Help from IBM
  23. Back cover