HP StorageWorks Storage Mirroring application notes High availability for Oracle 9i Part number: T2558–88087 Fourth edition: May 2008
Legal and notice information © Copyright 2005-2008 Hewlett-Packard Development Company, L.P. Hewlett-Packard Company makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Document overview This document is a 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.
Solution overview Oracle is a scalable, reliable, flexible, and high-performance relational database management system for many server-based operating systems. Storage Mirroring provides real-time enterprise data protection and replication. Storage Mirroring can be used to provide high availability for Oracle. This document describes the steps necessary to configure Storage Mirroring to provide high availability for Windows® servers running Oracle 10g.
Sample implementation This section describes an example of how to configure Storage Mirroring and Oracle. 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 in order to Install software on the source. Install software on the source 1. Install Oracle on the source, if it is not already installed. 2.
• File Description—This column gives a brief description of each file. Default Location and Table to Query—The Default Location column identifies the directory where a specific file is stored if you choose the default installation directory. If you did not use the default directory and do not know the location of a specific file, query the table identified in the Table to Query column to determine the location. For detailed information on querying tables, see your Oracle reference guide.
File Name File Description Default Location Table to Query xdb#.dbf XML data and metadata oracle\oradata\instance_name V_$DATAFILE listener.or a Service Configurati on File oracle\ora90\network\admin N/A tnsnames.or a Client Configurati on File oracle\ora90\network\admin N/A pwd*.ora Password Informatio n File \oracle\ora90\database N/A NOTE: The Listener service will not start on the target if listener.ora is replicated from the source, but the target is not in a failed over state.
NOTE: After you modify the sample scripts, save them with a new name to remove the sample_ prefix. Copy the scripts to the directory where Storage Mirroring is installed. 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. Sample_postover.bat rem ## ***SAMPLE*** Oracle post-failover script rem ## This sample batch file is provided as an example only.
rem ## The following lines mount and open the databases. Note that the same rem ## command is repeated for each database. Also note that separate files rem ## (DB1_Start.sql and DB2_Start.sql) are called for the different databases rem ## so that the correct path to the parameter file (init.ora) is used. rem ## The outcome is redirected to a log file in the failover directory. Check rem ## this log file for errors. Substitute your instance names for instance_name1 rem ## and instance_name2.
Sample_preback.bat rem ## ***SAMPLE*** Oracle pre-failback script rem ## This sample batch file is provided as an example only. Because no two rem ## environments or configurations are exactly the same, you MUST modify rem ## this script in order to make the solution work in your environment. rem ## This script makes the following two assumptions: rem ## 1. You have created a directory c:\oracle_fo rem ## 2. The db_stop.
6. In the Monitor Settings window, mark the IP address that is going to failover 7. Click Scripts and specify the scripts that were created previously, using postover.bat for the target post-failover script and preback.bat for the target pre-failback script NOTE: The scripts are processed using the same account running the Storage Mirroring service. 8. Click OK to go back to the Monitor Settings dialog box. 9. Click OK to begin monitoring the source machine.
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. Verify that your source machine is not connected to the network. If it is, disconnect it. 2. Resolve the source machine problem that caused the failure NOTE: If you must rebuild your hard drive, continue with step 3.
9. Select the failed source and click Failback The pre-failback script entered during the failover configuration stops the Oracle services on the target so that no additional changes can be made. 10. You will be prompted to determine if you want to continue monitoring the source server. Do not choose Continue or Stop at this time. 11. Connect the source machine to the network. 12. After the source is back online, select whether or not you want to continue monitoring this source machine (Continue or Stop).
• Replication Set—The name of the replication set to be restored. • 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. 15. Identify the correct drive mappings for the data and any other restoration options necessary. For detailed information on the restoration options, see the Storage Mirroring User’s Guide. 16. Verify that the selections you have made are correct and click Restore.