HP StorageWorks Storage Mirroring application notes - High availability for Oracle 9i (T2558-88087, April 2008)
Storage Mirroring High availability for Oracle 9i application notes 9
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.
set ORACLE_SID=instance_name1
%ORACLE_HOME%\bin\sqlplus.exe "/ AS SYSDBA"
<%ORACLE_FO%\db1_start.sql>%ORACLE_FO%\start_%ORACLE_SID%.log
set ORACLE_SID=instance_name2
%ORACLE_HOME%\bin\sqlplus.exe "/ AS SYSDBA"
<%ORACLE_FO%\db2_start.sql>%ORACLE_FO%\start_%ORACLE_SID%.log
rem ## The following line starts the Oracle Listener service. The outcome is
rem ## redirected to the failover directory where a log file is created.
rem ## Check this log file for errors.
NET START OracleOraHomeTNSListener >>%ORACLE_FO%\start_services.log
The DBx_START.SQL script used in the post-failover script is included below. You may have multiple files,
DB1_START.SQL, DB2_START.SQL, etc., if you have multiple databases.
Sample_DBx_start.sql
# ***SAMPLE*** db_start.sql script called during the Storage Mirroring post-failover
sequence.
# This sample batch file is provided as an example only. Because no two
# environments or configurations are exactly the same, you MUST modify
# this script in order to make the solution work in your environment.
# The following line identifies the Oracle instance to start.
# Replace instance_name with the name of the instance.
startup pfile=c:\oracle\admin\instance_name\pfile\init.ora
exit
NOTE: After failover is complete, users will need to log back into the Oracle database. You
may want to devise an automatic process to notify the users of this information and
include it at the end of the post-failover script.
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 Oracle services on the target automatically. To do this,
create a batch file called
PREBACK.BAT using the sample batch file below. Save the
batch file to the same directory where your Storage Mirroring files are installed.