HP StorageWorks Guidelines for using IBM® DB2® Universal Database® (UDB) with HP StorageWorks Storage Mirroring Application Note doc-number Part number: T2558-96335 First edition: May 2009
Legal and notice information © Copyright 2009 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents About this guide ................................................................................... 5 Intended audience ...................................................................................................................... Prerequisites ............................................................................................................................... Related documentation ...................................................................................................
Tables 1 Document conventions ...............................................................................................
About this guide This document is a HP StorageWorks Storage Mirroring application note. An application note provides guidelines on the use of Storage Mirroring in a specific environment. This document contains: Document Overview: Explains what an application note contains, how it should be used, what you need to know before trying to use the application note, and where you can go for more information.
Related documentation Before you begin to configure your solution, make sure that you have complete documentation for your operating system, application, and Storage Mirroring. This application note does not provide step-by-step instructions for using standard operating system, application, and Storage Mirroring functionality.
CAUTION: Indicates that failure to follow directions could result in damage to equipment or data. IMPORTANT: Provides clarifying information or specific instructions. NOTE: Provides additional information. TIP: Provides helpful hints and shortcuts. HP technical support For worldwide technical support information, see the HP support website: http://www.hp.
Documentation feedback HP welcomes your feedback. To make comments and suggestions about product documentation, please send a message to storagedocsFeedback@hp.com. All submissions become the property of HP.
1 Solution Overview IBM DB2 UDB is a scalable, reliable, flexible, and high-performance relational database management system for Microsoft® Windows® server-based systems. Storage Mirroring provides real-time enterprise data protection and replication. Storage Mirroring can be used to provide high availability for your DB2 database. This document describes the steps necessary to configure Storage Mirroring to provide high availability for Windows 200x servers running IBM DB2 UDB.
The sample batch files provided are only examples. Because no two environments or configurations are exactly the same, you MUST modify the sample scripts in order to make the solution work in your environment. Configuring the replication set IBM DB2 UDB creates multiple files for each database. You must make sure that all necessary files are included in the replication set so that they will be available on the target server.
NOTE: The DB2 - DB2-0 service does not always stop on the first attempt, so you will want to configure your script so that it includes a second attempt to stop the DB2-DB2-0 service. The following services must be started/stopped for DB2 v 9.x: • DB2 • DB2DAS00 These services can be scripted to start and stop at the appropriate times by using failover and failback scripts.
Solution Overview
2 Sample Implementation This section describes an example of how to configure Storage Mirroring and DB2. Use these procedures as a guideline for creating your own implementation. Because no two environments or configurations are exactly the same, you will probably need to implement additional or different steps than what is documented here in order to make the solution work in your environment.
3. 4. 5. Install DB2 on the target using the same drive and directory specifications recorded in step 2. The DB2 installation must be identical on the source and target. By default, DB2 services are set to automatic startup. You must stop the services listed in Managing DB2 services Managing DB2 services, page 10 and set them to manual startup on the target. This ensures that all DB2 files are closed on the target and the Storage Mirroring source can replicate the changes.
path. (For detailed information on connecting a source and target, see the HP StorageWorks Storage Mirroring user’s guide.) 10. Select One to One to map the replication set data from the source to an identical volume/directory structure on the target. 11. On the Orphans tab, select the Move/Delete Orphan Files checkbox. 12. On the Mirroring tab, select the type of mirror, either Full or File Differences, to perform.
2. After a failure is resolved, you will be ready to bring your source back online. At this time, you will want to stop the DB2 services on the target automatically. To do this, create a batch file called failback.bat using the sample batch file below. Save the batch file to the same directory where your Storage Mirroring files are installed. Begin monitoring the source for failure 1. 2. 3. 16 On the target, select Start, Programs, Storage Mirroring, Failover Control Center.
4. In the left pane of the Monitor Settings window, select the check box for the IP address that is going to failover. Verify that the correct NIC is selected in the right-hand pane under Current IP Address(es). 5. Highlight the machine name under Names to Monitor and click Scripts. Specify the scripts that were created earlier using failover.bat for the target post-failover script and failback.bat for the target pre-failback script.
The target server is now standing in for the source DB Restore your data If your source experiences a failure, such as a power, network, or disk failure, your target machine will stand in for the source while you resolve the source machine issues. During the source machine downtime, data is updated on the target machine. When your source machine is ready to come back online, the data is no longer current and must be updated with the new data on the target machine. 1. 2.
8. You will be prompted to determine if you want to continue monitoring the source server. Do not choose Continue or Stop at this time. 9. Connect the source machine to the network. 10. After the source is back online, select whether or not you want to continue monitoring this source machine (Continue or Stop). NOTE: Verify that the Storage Mirroring connection on the source has been disconnected (right-click the connection in the Storage Mirroring Management Console and select Disconnect). 11.
• Restore To—The name of the machine where the data will be restored. This may or may not be the same as the original source machine. 13. Identify the correct drive mappings for the data and any other restoration options necessary. For detailed information on the restoration options, see the HP StorageWorks Storage Mirroring user’s guide. 14. Select the Use block checksum comparison/delta block transfer option. 15. On the Orphans tab, select Delete Orphaned Files. 16.