You are on page 1of 112

VERITAS Cluster Server Enterprise Agent 4.

1 for Oracle
Installation and Configuration Guide
HP-UX

N12191G June 2005

Disclaimer The information contained in this publication is subject to change without notice. VERITAS Software Corporation makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. VERITAS Software Corporation shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual. VERITAS Legal Notice Copyright © 2005 VERITAS Software Corporation. All rights reserved. VERITAS and the VERITAS Logo are trademarks or registered trademarks of VERITAS Software Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. VERITAS Software Corporation 350 Ellis Street Mountain View, CA 94043 USA Phone 650–527–8000 Fax 650–527–2908 www.veritas.com

ii

VCS Enterprise Agent for Oracle, Installation and Configuration Guide

Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii How This Guide is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vii Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Documentation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About the VCS Enterprise Agent for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Oracle Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Netlsnr Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Additional Information About the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Startup and Shutdown Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Handling Oracle Error Codes During Detail Monitoring . . . . . . . . . . . . . . . . . . . . . . 6 Handling Attribute of Type Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Info Entry Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Action Entry Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 How the Agent Makes Oracle Highly Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Typical Oracle Configuration in a VCS Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Setting Up an Oracle Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

iii

. . . . . . . . . . . . . . 31 Prerequisites . . . . . . . 15 Defining NLS Information . . . . . . . . . . . . . . . . . . . . . . . . 15 Location of Database Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Chapter 4. . . . . . . . . . . . . . . . . . . . . . 29 Starting the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 iv VCS Enterprise Agent for Oracle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Prerequisites . . . . . . . . . . . . . . . . . . Installing and Configuring Oracle . . . . . . . . . 18 Installing Oracle Binaries . . . . . . . . . . . . . . . . . . . . . . . . . 36 Single Oracle Instance Configuration . . . . . . . . . . . . . . . . . . . 13 Prerequisites . . . . . Configuring the Agent . . . . . . . 16 Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Oracle Configurations in VCS . . . . . . 32 Upgrading the Agent . . .Chapter 2. . . . . . . . Installation and Configuration Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Multiple Oracle Instances (Multiple Listeners) Configuration . . . . . . . 38 Configuration With Shared Server Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the Oracle Agent . . . . . . . . . . . . . . . . . . . 17 Overview of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Multiple Oracle Instances (SIDs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Transparent Listener Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Multiple Oracle Instance (Single Listener) Configuration . . . . . . . . . . . . . . . . . . . . . . . . 29 Setting MLOCK Privilege for DBA User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Configuring the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Installing the Agent Software . . . . . . . . . . . . . . . . 15 Long Pathname Limitation for $ORACLE_HOME . . . . . . . . . . . . . . . . . . . . . . . . 16 Hot Backup of Oracle Database and VCS . . . . . . . . . . . . . . . . . 13 Points to Note Before Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Copying the $ORACLE_BASE/admin/SID Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Chapter 3. . . . . . . . . . . . . . . . . . . . . . . . . 14 Location of the $ORACLE_HOME . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Agent Using the Agent Configuration Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Enabling and Disabling Detail Monitoring for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Removing the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Switching the Service Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Configuring the Agent Using the Command-line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Error Messages Specific to the Oracle Agent . . . . . . . . . . . . . . . . . . . . . 42 Prerequisites . . . . . . . . . . . . . . . . . . 53 Editing Resource attributes . . . . . . . . . . . . . . . . . . . 71 Contents v . . . . . . . . . . . . . . . . . . 62 Chapter 5. . . . . . . . . . . . .63 Bringing the Service Group Online . . . . . . . . . . . . . 42 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Taking the Service Group Offline . . . . . . . . . . . . . 59 Setting Up Detail Monitoring for Oracle . . . . . . . . . 59 Setting Up Detail Monitoring . . . . . . . . . . . . . . . . . . . . 64 Disabling the Agent . 65 Modifying the Agent Configuration . . . . . . . . . . Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Encrypting Passwords . . . . . . . . . 53 Creating a New Service Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Chapter 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Additional Considerations with Basic Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Setting Up Detail Monitoring for Netlsnr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Error Messages Specific to the Netlsnr Agent . . . . . . . . . . . 67 Error Messages Common to the Oracle and Netlsnr Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Configuring the Agent Using Cluster Manager (Java Console) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Administering the Oracle Service Group . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Using the SPFILE in a VCS Cluster . . . . . . . . . Using the SPFILE in an Oracle Cluster . . . . . . . . . . . 83 Multiple Instance (Multiple Listeners) Configuration . . . . . . . 79 Single Oracle Instance Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Multiple Oracle Instances (Single Listener) Configuration . . 100 Creating the SPFILE from a PFILE . . . . . . . . . . . . . . . . . . . . . 97 Appendix D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Appendix C. . . . . . . . . . . 99 Starting an Oracle Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Oracle Configuration With Shared Server Support . . . . . . . . . 100 Specifying the SPFILE Location in the PFILE . . . . . . . . . . 77 Appendix B. . . . . Resource Type Definitions . . 74 Netlsnr Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . 101 vi VCS Enterprise Agent for Oracle. . . Sample Configurations . . . . . . . . . . 73 Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Oracle Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Appendix A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Best Practices for Multiple Oracle Instance Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation and Configuration Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

“Administering the Oracle Service Group” on page 63 describes the administrative tasks you can perform on an Oracle service group. “Configuring the Agent” on page 35 describes how to configure an Oracle service group in a VCS cluster. Appendix C. Chapter 5. “Troubleshooting” on page 67 lists the error messages associated with the VCS enterprise agent for Oracle. Chapter 2. a recommended solution is also provided. Appendix D. “Using the SPFILE in an Oracle Cluster” on page 99 describes how to use the SPFILE in an Oracle cluster. “Sample Configurations” on page 79 provides sample configurations for the Oracle service group. “Resource Type Definitions” on page 73 lists the resource type definitions and attribute definitions for the VCS enterprise agent for Oracle. “Installing and Configuring Oracle” on page 13 describes how to install and configure Oracle in a VCS cluster. Appendix A. If applicable. Appendix B. vii . Chapter 4. Chapter 3.1 for Oracle. If this document is dated more than six months prior to the date you are installing your enterprise agent. “Best Practices for Multiple Oracle Instance Configurations” on page 97 lists some best practices for using the VCS enterprise agent for Oracle. “Introduction” on page 1 presents a brief introduction of the VCS enterprise agent for Oracle. “Installing the Oracle Agent” on page 31 describes how to install VCS enterprise agent for Oracle in a VCS cluster.Preface This book describes how to install and configure the VERITAS Cluster Server (VCS) Enterprise Agent 4. Chapter 6. How This Guide is Organized Chapter 1. contact VERITAS Technical Support to confirm you have the latest supported versions of the application and operating system.

Example Read tunables from the /etc/vx/tunefstab file. See the ls(1) manual page for more information. functions. # ls pubs monospace (bold) italic Identifies book titles. Unix superuser prompt (all shells). commands. emphasized text. menu selections. Depicts GUI objects. Press Return. such as fields. etc.1/user_book /release_mgnt/4.Conventions Conventions Convention monospace Usage Used for path names. and parameters. See the User’s Guide for details. directory and file names. list boxes. See “Getting Help” on page ix. and variables replaced with a name or value. Enter your password in the Password field. output.1/archive bold blue text # viii VCS Enterprise Agent for Oracle. Indicates hypertext links. Also depicts GUI commands. new terms. The variable system_name indicates the system on which to enter the command. Indicates user input. # cp /pubs/4. Installation and Configuration Guide .

including current and past releases of product documentation.veritas. Diagnostic tools are also available to assist in troubleshooting problems associated with the product. For assistance with topics other than documentation.com/productcenter/ContactVeritas. Chapter .veritas. quality documentation. Send suggestions for improvements and reports on errors or omissions to clusteringdocs@veritas. Include the title and part number of the document (located in the lower left corner of the title page). product alerts.com. software downloads. and chapter and section titles of the text on which you are reporting.veritas.com. For information on purchasing product documentation. For license information.Getting Help Getting Help For technical assistance. and the VERITAS customer email notification service. Our goal is to ensure customer satisfaction by providing effective. visit http://webstore. Documentation Feedback Your feedback on product documentation is important to us.com. visit https://my. visit http://support. software updates and sales contacts. This site also provides access to resources such as TechNotes.veritas.jsp. See the README. visit http://support.VRTSspt file in the /support directory for details. ix . Use the Knowledge Base Search feature to access additional product information. These tools are available on disc or can be downloaded from the VERITAS FTP site. hardware compatibility lists.com and select phone or email support.

Documentation Feedback x VCS Enterprise Agent for Oracle. Installation and Configuration Guide .

which monitors the listener process. and takes them offline.Introduction 1 VCS enterprise agents monitor specific resources within an enterprise application. About the VCS Enterprise Agent for Oracle The VCS enterprise agent for Oracle monitors the Oracle and listener processes. The Netlsnr agent. 1 . respectively. and start or stop them according to external events. The VCS enterprise agent for Oracle provides high availability for Oracle in a VCS cluster. The package contains two VCS agents: ◆ ◆ The Oracle agent. Both agents work together to make Oracle highly available in a VCS cluster. determine the status of these resources. and are represented with the Oracle and Netlsnr resource types. The agents include VCS type declarations and agent executables. brings them online. which monitors the Oracle database processes.

About the VCS Enterprise Agent for Oracle Oracle Agent The Oracle agent monitors the database processes. Specific agent operations include: ◆ Online—Starts the Oracle database by using the following svrmgrl or sqlplus command: startup pfile=$PFile force You can also configure the agent to start the database using different Startup options for Oracle. 2 VCS Enterprise Agent for Oracle. the agent scans the process table for the ora_dbw. Clean—Forcibly stops the Oracle database by using the following svrmgrl or sqlplus command: shutdown abort ◆ If the process does not respond to the shutdown command. Installation and Configuration Guide . See “Startup Options” on page 4 for more information about these options. See “Info Entry Point” on page 7 for more information. In the basic monitoring mode. In the detail monitoring mode. ◆ ◆ Info—Provides static and dynamic information about the state of the database. Action—Performs predefined actions on a resource. ora_smon. ◆ Monitor—The Oracle agent provides two levels of monitoring: basic and detail. ora_pmon. the agent scans the process table for processes associated with the configured instance and kills them. See “Action Entry Point” on page 8 for more information. ◆ Offline—Stops the Oracle database with the specified options by using the following svrmgrl or sqlplus command: shutdown immediate You can also configure the agent to stop the database using different Shutdown options for Oracle. See “Shutdown Options” on page 5 for more information about these options. the agent performs a transaction on a test table in the database to ensure that Oracle is functioning properly. and ora_lgwr processes to verify Oracle is running.

and takes them offline. the agent uses the password to stop the listener. Specific agent operations include: ◆ Online—Starts the listener process by using the following command: lsnrctl start $LISTENER ◆ Offline—Stops the listener process by using the following command: lsnrctl stop $LISTENER If the listener is configured with a password. Action—Performs predefined actions on a resource. The Netlsnr agent brings the listener services online. ◆ ◆ Chapter 1. the agent scans the process table for the tnslsnr process to verify the listener process is running. In the detail monitoring mode. Introduction 3 . monitors their status. ◆ Monitor—The Netlsnr agent provides two levels of monitoring: basic and detail. Clean—Scans the process table for tnslsnr $Listener and kills it. See “Action Entry Point” on page 8 for more information.About the VCS Enterprise Agent for Oracle Netlsnr Agent The Netlsnr agent monitors the listener process. The agent controls the listener for the database. The listener is a server process that listens to incoming client connection requests and manages traffic to the database. In the basic monitoring mode. the agent uses the command lsnrctl status $LISTENER to verify the status of the Listener process.

It picks up the default parameter files from their default locations. The script must be in the $VCS_HOME/bin/Oracle directory and must have access to the Oracle Owner OS user. Startup Options The agent supports the following startup options: Startup Option STARTUP (Default) Description Runs startup pfile='location_of_pfile’ force if the pfile is configured. Performs a database recovery on instance startup. Uses a predefined SQL script (start_custom_$SID.sql exit. Use this option for RAC clusters for Oracle9i R2 and later. ! SRVCTLSTART Uses the srvctl utility to start an instance of the database. @start_custom_$SID. If the file is not present. the agent takes the following action: sqlplus /nolog <<! connect / as sysdba.Additional Information About the Agent Additional Information About the Agent Startup and Shutdown Options You can specify Startup and Shutdown options for configured Oracle instances. the agent logs an error message. RESTRICTED RECOVERDB CUSTOM Starts the database in the RESTRICTED mode. Installation and Configuration Guide . If the pfile is not configured. With a custom script. 4 VCS Enterprise Agent for Oracle.sql) and runs custom startup options. the agent runs startup force.

If the file is not present. TRANSACTIONAL CUSTOM SRVCTLSTOP Chapter 1. Introduction 5 . This option is valid only for RAC instances in versions 9. Uses the srvctl utility to stop an instance of the database.sql) and runs custom shutdown options. Uses a predefined SQL script (shut_custom_$SID. Runs the shutdown transactional command.2. the agent shuts the agent down with the default option. Use this option for RAC clusters for Oracle9i R2 and later.0 and above.Additional Information About the Agent Shutdown Options The agent supports the following shutdown options: Shutdown Option IMMEDIATE (Default) SRVCTLSTOP Description Shuts down the Oracle instance by running shutdown immediate. This option is valid only for databases that support this option. The script must be in the $VCS_HOME/bin/Oracle directory and must have access to the Oracle Owner OS user. Sets up srvctl as the client tool and uses srvctl syntax to shut down the instance.

For example. Freezes the service group temporarily and marks the resource state as The agent also sends a notification if the Notifier resource is configured. See the VERITAS Cluster Server User’s Guide for more information about VCS notification. This faults the service group. The agent includes a reference file called oraerror. WARN Marks the resource state as ONLINE and sends a notification if the Notifier resource is configured. This action is typically associated with configuration errors or program interface errors. This action is typically associated with errors that are not system-specific. failing it over to another node will not help. which fails over to the next available system.dat. if a database does not open from a node due to corrupt Oracle files. This action is typically associated with errors due to exceeded quota limits. If the file oraerror. NOFAILOVER OFFLINE. Installation and Configuration Guide . Marks the resource state as UNKNOWN and sends a notification if the Notifier resource is configured. The file stores information in the following format: Oracle_error_string:action_to_be_taken For example: 01035:WARN 01034:FAILOVER The agent supports the following actions: Action IGNORE UNKNOWN Description Ignores the error.dat is not available. which lists Oracle errors and the action to be taken when the error is encountered. the agent assumes this default behavior for every Oracle error encountered. FAILOVER (Default) Marks the resource state as OFFLINE. The agent classifies Oracle errors according to their severity and associates predefined actions with each error code. session limits/restricted sessions so on. 6 VCS Enterprise Agent for Oracle.Additional Information About the Agent Handling Oracle Error Codes During Detail Monitoring The VCS enterprise agent for Oracle comes with enhanced handling of Oracle errors during detail monitoring. This is agent’s default behavior.

This password is considered for querying the status of the listener and stopping the listener.sql. Info Entry Point The VCS enterprise agent for Oracle supports the Info entry point. This password is also encrypted. Chapter 1. The format of the selected record must be as follows: attribute_type:userkey_name:userkey_value The variable attribute_type can take the value static and/or dynamic. which provides static and dynamic information about the state of the database. For example: select 'static:HostName:'||host_name from v$instance. Introduction 7 . The entry point retrieves the following static information: ◆ ◆ ◆ Version DatabaseName Parallel ◆ ◆ ◆ InstanceNo HostName Thread ◆ ◆ ◆ InstanceName StartupTime InstanceRole The entry point retrieves the following dynamic information: ◆ ◆ ◆ ◆ InstanceStatus LogMode TotalDBfileSize Buffer Hits Percent ◆ ◆ ◆ Logins ShutdownPending FreeDBfileSize ◆ ◆ ◆ OpenMode DatabaseStatus Shared Pool Percent free You can add additional attributes by adding sql statements to the file $VCS_HOME/bin/Oracle/resinfo. See “Encrypting Passwords” on page 58 for further information.Additional Information About the Agent Handling Attribute of Type Password User passwords used for detail monitoring of the Oracle database are no longer ‘clear-text’. Configuring ‘listener’ passwords is introduced in the Netlsnr agent. See “Encrypting Passwords” on page 58 for further information. The Oracle agent supports encryption of user passwords. select 'dynamic:ShutdownPending:'||shutdown_pending from v$instance.

For further information. refer to the VERITAS Cluster Server Agent Developer’s Guide. Changes the database session to disable the RESTRICTED mode. Backs up a tablespace.1 on HP-UX September 2004 HP-UX 11i version 2. You can use this option for the Oracle and the Netlsnr resources.. Installation and Configuration Guide . which enables you to perform predefined actions on a resource. VRTS_GetRunningServices DBRestrict DBUndoRestrict DBSuspend DBResume DBTbspBackup You can also add custom actions for the agent. type the following command: # hares -action <res> <token> [-actionargs <arg1> .1.. Supported Software ◆ ◆ ◆ Oracle 8.0 Note Within the cluster. and Oracle 10g.Supported Software Action Entry Point The VCS enterprise agent for Oracle supports the Action entry point. This option is available for Oracle versions 8i and above. Oracle 8. including 64-bit versions VCS 4. all systems must use the same operating system version and patch level.] [-sys <system>] [-clus <cluster>] Action VRTS_GetInstanceName Description Retrieves the name of the configured instance. The agent supports the following actions: To perform an action on a resource. Resumes a suspended database. You can use this option for the Oracle and the Netlsnr resources. Oracle9i. Changes the database session to enable the RESTRICTED mode. Retrieves the list of processes monitored by the agent. Suspends a database.x.x. actionargs contains name of the tablespace to be backed up. 8 VCS Enterprise Agent for Oracle. This option is available for Oracle versions 8i and above.0.

◆ Secondary or Detail Monitoring In the Detail monitoring mode. When this occurs. The agent detects application failure if the monitoring routine reports that the Oracle or listener processes are not functioning properly. the Oracle service group fails over to another node in the cluster. Introduction 9 . the agent runs a perl script that executes commands against the database and listener to verify their status. the agent verifies that the Oracle and listener processes are present in the process table.How the Agent Makes Oracle Highly Available How the Agent Makes Oracle Highly Available The VCS enterprise agent for Oracle continuously monitors the Oracle and listener processes to verify they are functioning properly. thus ensuring high availability for the Oracle services and the database. Chapter 1. Note Basic monitoring cannot detect whether processes are in a hung or stopped states. The agent provides two levels of application monitoring: ◆ Primary or Basic Monitoring In the Basic monitoring mode.

The Oracle binaries can be installed locally on both nodes or on shared disks.Typical Oracle Configuration in a VCS Cluster Typical Oracle Configuration in a VCS Cluster In a typical configuration. In the configuration depicted in the illustration below. VCS is configured in a two-system cluster (System 1 and System 2). Oracle binaries and data are installed completely on shared disks. VCS Private Network System 1 System 2 Shared Disks / Disk Groups Oracle Binaries & Datafiles Public Network 10 VCS Enterprise Agent for Oracle. The Oracle enterprise agent is installed on both systems. The data to be used by Oracle is installed on shared storage. Installation and Configuration Guide .

VCS Private Network Oracle Binaries System 1 Oracle Binaries System 2 Shared Disks / Disk Groups Oracle Datafiles Public Network Setting Up an Oracle Cluster Setting up an Oracle cluster in a VCS environment involves the following tasks.Setting Up an Oracle Cluster In the configuration depicted in the illustration below. Setting up a VCS cluster (described in the VCS Installation Guide) “Installing and Configuring Oracle” on page 13 “Installing the Oracle Agent” on page 31 “Configuring the Agent” on page 35 Chapter 1. Oracle binaries are installed locally on each node and Oracle data is installed on shared disks. Introduction 11 . Each task is described in detail in subsequent chapters.

Setting Up an Oracle Cluster 12 VCS Enterprise Agent for Oracle. Installation and Configuration Guide .

Installing and Configuring Oracle 2 This chapter describes how to install and configure Oracle and its components in a VCS cluster. The chapter also lists the prerequisites for installing Oracle. Prerequisites ✔ Verify that all systems in the cluster have adequate resources to run Oracle and VCS. For more information on installing Oracle. refer to the Oracle documentation on HP-UX. 13 . ✔ Verify that the network supports the TCP/IP protocol.

that is. By contrast. 14 VCS Enterprise Agent for Oracle. each cluster system must have the same mount point directory for the shared file system. $ORACLE_HOME Directory on the Local Disk Installing $ORACLE_HOME on the local disk has the advantage of allowing an upgrade of the Oracle database server running on an offline system while the database server runs on another system. each at a different version of Oracle. The disadvantage of this approach is that with a large number of systems. $ORACLE_HOME Directory on Shared Disks When the Oracle Database Server ($ORACLE_HOME) is installed on shared disks.Points to Note Before Installing Oracle Points to Note Before Installing Oracle The following sections discuss some important tasks that need to be noted before you install Oracle in a VCS cluster on HP-UX. The following points discuss the advantages of each approach. three copies of Oracle. locally on each server’s disk. would require as many as 12 copies of the binaries (three versions on four systems). If the Oracle binaries are placed on shared storage. which contains the Oracle binaries and configuration files. The correct location for Oracle binaries depends on your environment. Location of the $ORACLE_HOME You can install the Oracle home directory ($ORACLE_HOME). Installation and Configuration Guide . in a four-system cluster. one per version are required on shared storage. or service groups. For example. An instance can be moved to a new server in the cluster that shares the storage. it is possible to have three database instances. placing the binaries on local storage. it becomes difficult to maintain the various Oracle installations. permitting a minimum amount of downtime. you can place the Oracle home directory on the shared storage. Each database service group is self-contained. The database server can later be switched to the upgraded system (provided the database is compatible). Alternatively. Placing Oracle binaries on shared storage simplifies setting up a given system in a cluster to run an instance. The disadvantage of this approach is that a rolling upgrade of binaries on shared storage is not possible.

the file systems containing these files must be located on shared disks. verify that the file /etc/services on each system defined in the service group’s SystemList attribute contains entries for the service name of the Oracle Net Service. For example.ora. or access mode. You must create the link on each of the systems in the cluster. If you are using raw devices on shared disks for Oracle tablespaces. In this case. the startup profile for each instance must be accessible on all systems listed in the service group’s SystemList attribute. type: # vxedit -g diskgroup_name set group=dba user=oracle mode=660 volume_name Note The user oracle and the group dba must be local and not Network Information Service (NIS and NIS+) users Transparent Listener Failover To enable Oracle Server clients to reconnect after a system switch without reconfiguring. The full pathname of processes in $ORACLE_HOME can possibly have 80 characters or more. If you are using the TCP/IP protocol for Oracle client/server communication. if you are using VERITAS Volume Manager. Chapter 2. you can create a soft link to the $ORACLE_HOME directory and use it in place of the long filename in the Home attribute in the main. change the ownership to Oracle dba user and the permissions. The hostname mapping the IP address of this resource must be used for the Host field in the file $TNS_ADMIN/listener. Installing and Configuring Oracle 15 .cf file. to 660 on the raw devices storing the Oracle data. include at least one IP resource in the service group for the Oracle resource. Create the same file system mount points on each system. Location of Database Tablespaces If the tablespaces are created using regular (UFS or VxFS) files.Points to Note Before Installing Oracle Multiple Oracle Instances (SIDs) If multiple Oracle instances are defined in a single cluster configuration. Long Pathname Limitation for $ORACLE_HOME The HP-UX process table limits process pathnames to 79 characters.

Create a soft link to the long pathname. modify the Home and Pfile attributes for both the Oracle resource type and the Netlsnr resource type (refer to the Sample Configuration in “Sample Configurations” on page 79). Defining parameters in the Oracle parameters file affects NLS settings for the Oracle server. 16 VCS Enterprise Agent for Oracle. you must take the datafiles in the database out of the backup mode and shut down the database so that it can be reopened. is set to a non-zero value. the failover to another node can succeed only if the Oracle resource attribute. Defining environment variables affects the NLS input and output of client utilities.cf. For example: Home = "/opt/link_to_longpath" Pfile = "/opt/link_to_longpath/dbs/initVRT. The following errors are displayed to indicate this condition: $ ORA-1110 "data file %s: ’%s’" or $ ORA-1113 "file %s needs media recovery" Before VCS can online the Oracle resource group on the failover system. Installation and Configuration Guide .Points to Note Before Installing Oracle 1. In the file /etc/VRTSvcs/conf/config/main. For example: # ln -s /opt/apps/oracle/home/directory/is/longer/than /eighty/characters/oracle /opt/link_to_longpath 2. the database in the backup mode on the failover system cannot be opened and VCS cannot online the Oracle resource group. See the description of the EnvFile attribute in “Resource Type Definitions” on page 73. Hot Backup of Oracle Database and VCS If a cluster node fails while running a hot backup of an Oracle database. See “Resource Type Definitions” on page 73 for more information about the Oracle agent attributes. Refer to the Oracle documentation for instructions on how to change the state of the database files. Otherwise. AutoEndBkup.ora" Defining NLS Information You can define NLS information by defining the appropriate parameters in the Oracle parameter file or by defining the appropriate environment variables in the EnvFile.

Installing and Configuring Oracle 17 . group_id. id_name. redo log files. You can install Oracle in the following two ways in a VCS environment: ◆ $ORACLE_HOME on the shared disk. is installed on shared disks. including the datafiles. Oracle binaries and data. and the spfile. ◆ Note When installing Oracle. archive log files. redo log files. The user oracle and the group dba must be local and not Network Information Service (NIS and NIS+) users Chapter 2. and group_name for the Oracle owner is the same on all the nodes. including the datafiles. archive log files. Oracle binaries are installed ly on each node and the data. control files. and the spfile are installed on shared disks.Installing Oracle Installing Oracle The strategy for installing Oracle into a VCS cluster is aimed at ensuring that installations on all cluster systems are uniform. $ORACLE_HOME on the disk. control files. ensure that the login_id.

Installing Oracle Overview of Tasks This section provides an overview of tasks required to install Oracle in a VCS cluster. 18 VCS Enterprise Agent for Oracle. These tasks are described in detail in following sections. Mount the Oracle binaries directory and verify that the database can be started from all nodes. “Starting the Database” on page 29 The methodology is to install the Oracle binaries and to create the Oracle database on shared disks during the first installation. $ORACLE_HOME on Shared Disks Installing Oracle such that the $ORACLE_HOME is on shared disks involves the following tasks. Installation and Configuration Guide . Installing Oracle binaries on shared disks (See “Installing Oracle Binaries” on page 20) Creating the database on shared disks (See “Configuring the Database” on page 24) Mounting the Oracle binaries directory Repeat steps on every cluster node.

This ensures that all Oracle installations are identical and access the database from the same location on the shared disk. Installing and Configuring Oracle 19 . Installing Oracle binaries locally on the first system (See “Installing Oracle Binaries” on page 20) Creating the database on shared disks (See “Configuring the Database” on page 24) Installing Oracle binaries on the local disks (See “Installing Oracle Binaries” on page 20) Copying the $ORACLE_BASE/admin/SID directory to the local disks (See “Installing Oracle Binaries” on page 20) Repeat steps on every cluster node. Chapter 2.Installing Oracle $ORACLE_HOME on Local Disks Installing Oracle such that the $ORACLE_HOME is on local disks involves the following tasks. “Starting the Database” on page 29 The methodology is to install the Oracle binaries and to create the Oracle database on shared disks during the first installation.

specify a location on the local disk. Read the Welcome screen and click Next. the Inventory Location dialog box is displayed. If the $ORACLE_HOME will be on shared disks. 4. # /mnt/cdrom/runInstaller 3. mount the CD drive. If in your installation. Set the DISPLAY variable. Note that the screens and options presented by installers for other Oracle versions may differ. 20 VCS Enterprise Agent for Oracle. specify a location on the shared disk. 1. Installation and Configuration Guide . 2. Specify the location of your base directory and click OK. the $ORACLE_HOME will be on local disks. If this is the first Oracle installation.Installing Oracle Installing Oracle Binaries This section describes how to install Oracle9i for VCS. Insert the Oracle CD. and run the Oracle installer as Oracle User.

sh. enter the name of a UNIX group that will have permissions to update the Oracle software and click Next. enter or select a name and a path for the Oracle Home and click Next. Installing and Configuring Oracle 21 . Chapter 2. 6. Run the script and click Continue to return to the Oracle installer. The Oracle installer displays a message asking you to run the script /tmp/orainstRoot. 7.Installing Oracle 5. On the File Locations dialog box. On the UNIX Group Name dialog box.

select your installation type and click Next.Installing Oracle 8. select the Oracle9i Database option and click Next. select the Software Only option and click Next. Otherwise click Install. 11. review your selections. 9. On the Available Products dialog box. Installation and Configuration Guide . On the Summary dialog box. Click Back to make changes. 10. 22 VCS Enterprise Agent for Oracle. On the Installation Types dialog box. On the Database Configuration dialog box.

Click Next after the installation is complete. click Exit. Installing and Configuring Oracle 23 . 14.cssd run >/dev/null 2>&1 > </dev/null Chapter 2. Proceed to the next section to configure the database on shared disks. On the End of Installation dialog box. Additional Considerations For Installing Oracle 10g on Shared Disks Oracle 10g provides a clustering daemon called Oracle Cluster Synchronization Service Daemon (CSSD). VERITAS recommends you to disable the daemon by performing the following steps: Remove the following line from the /etc/inittab file on the system from where you ran the Oracle installation wizard: h1:23:respawn:/etc/init.Installing Oracle 12.d/init. Because a VCS cluster for Oracle does not require this daemon. the init command to start the deamon may result in an error. If the Oracle binary files are on a shared storage. 13.

# dbca 2. Set the DISPLAY variable and start the Oracle Database Configuration Assistant as Oracle User. You need to configure the database only once. select the Create a database option and click Next. Installation and Configuration Guide . Read the Welcome screen. 24 VCS Enterprise Agent for Oracle. On the Operations dialog box. from the node on which you installed Oracle first. 3. 1.Installing Oracle Configuring the Database This section instructs you on how to configure an Oracle9i database on shared disks using the Database Configuration Assistant. click Next.

On the Database Templates dialog box. enter or select a unique name and SID for the global database and click Next. On the Database Identification dialog box.Installing Oracle 4. Installing and Configuring Oracle 25 . Chapter 2. 5. select a template to create the database and click Next.

On the Database Connection Options dialog box. Installation and Configuration Guide . 26 VCS Enterprise Agent for Oracle. select the Dedicated Server Mode or the Shared Server Mode and click Next.Installing Oracle 6.

Chapter 2. b. Click Next. specify the locations of the archive logs and the initialization parameter files. If installing Oracle locally on all systems. Click the File Locations tab. c. Modify other parameters. If you want to enable archive logs for the database. This ensures that the Archive Log will be created on the shared disk. make sure that the initialization parameter file and the trace file directories are on the local disk. if desired. Installing and Configuring Oracle 27 . In the Archive Log Destination(s) list. e.Installing Oracle 7. a. click the Archive tab and select the Archive Log Mode check box. d. enter a path on the shared disk. On the Initialization Parameters dialog box.

enter a path on the shared disk for each datafile. and Redo log files. h. Expand the Datafiles folder by clicking the + next to it. a. b. e. Select the datafile in the left pane and click the General tab in the right pane. In the File Directory field in the right pane. Select the Redo Log file in the left pane. if desired. Click Next. Installation and Configuration Guide . In the Name field.Installing Oracle 8. enter the path of a directory on the shared disk for each Redo Log file. expand the Storage folder by clicking the + next to it. Data. specify the locations of the Control. f. d. On the Database Storage dialog box. g. Expand the Redo Log Groups folder by clicking the + next to it. c. enter a path on the shared disk for each control file. In the left pane. 28 VCS Enterprise Agent for Oracle. Click Controlfile and click the General tab in the right pane. In the File Directory field. Specify file sizes for the Redo Log files.

individually (see “Starting the Database” on page 29). Starting the Database Mount the database directory and start the database on each node. install Oracle locally on other systems (see “Installing Oracle Binaries” on page 20) and start the database on each system. If your $ORACLE_HOME is on local disks. On the Creation Options dialog box. On the Summary dialog box. Note You need to configure and test if the database is accessible on other nodes. If your $ORACLE_HOME is on shared disks. and start the database (see “Starting the Database” on page 29).Installing Oracle 9. The variable SID represents the database instance. Installing and Configuring Oracle 29 . Chapter 2. select the Create Database check box and click Finish. Copying the $ORACLE_BASE/admin/SID Directory Follow this instruction on each node in the cluster. 10. review your selections and click OK. Refer to Oracle’s OFA Structure for more information. mount the Oracle binaries on each node individually. only if the $ORACLE_HOME is on local disks. You can verify access to the database by running an SQL query. Copy the directory $ORACLE_BASE/admin/SID from the shared disk to the local disk.

Create the /etc/privgroup file and add the line: dba MLOCK 3. ▼ To set MLOCK privilege for DBA user 1. set the MLOCK privilege for the dba user. Installation and Configuration Guide .Installing Oracle Setting MLOCK Privilege for DBA User To prevent ASYNCH_IO errors from occuring during select and update queries on the Oracle database. Give the MLOCK privilege to the dba group: # setprivgrp dba MLOCK 2. Verify the availability of MLOCK privilege for the dba group: # /usr/bin/getprivgrp dba 30 VCS Enterprise Agent for Oracle.

31 . For more information.Installing the Oracle Agent This chapter describes how to install the Oracle agent in a VCS cluster. 3 Installing the Agent Software The VCS enterprise agent for Oracle is installed from the CD. ✔ If a previous version of the agent is installed. refer to “Upgrading the Agent” on page 34. Prerequisites ✔ Make sure that VCS is installed in the cluster. You must install the Oracle Enterprise Agent on all systems that will host the Oracle service group. If you have an earlier version of the agent installed. ✔ Install and configure the Oracle Server for HP-UX and the add-on Listener. uninstall it. see the Oracle documentation.

Mount the CD. to mount the CD to the mount point /cdrom.” type: For Bourne or Korn shell (sh or ksh): # DISPLAY=myws:0. 32 VCS Enterprise Agent for Oracle. make a note of the device file as it applies to your system.Installing the Agent Software Installation Instructions To access the VCS enterprise agent software on the disc. 2. 6. 5.0 Setting the DISPLAY environment variable in this way enables you to use the SD-UX graphical interface. you must mount the disc. Determine the block device file for the CD-ROM drive. 3. Set the display permission on your workstation: # xhost +myws 4.0 # export DISPLAY For C shell (csh or tcsh): # setenv DISPLAY myws:0. enter: # /usr/sbin/pfs_mount -t rrip /dev/dsk/clt2d0 /cdrom where /dev/dsk/c1t2d0 is the drive’s block device file. Enter: # ioscan -fnC disk For example. For example. /cdrom. Insert the CD in the CD-ROM drive installed on your local system. if it does not exist. The directory must have read/write permissions. For example. Create a mount point directory. Run the following commands to start PFS (Portable File System): # nohup pfs_mountd & # nohup pfsd & 8. if your workstation has the name “myws. Configure the shell environment variable DISPLAY on your workstation. Installation and Configuration Guide . ▼ To install the agent 1. The device file should have the form /dev/dsk/c#t#d#. the listing may indicate the CD-ROM drive’s block device is /dev/dsk/c1t2d0. Log in as root. 7.

Chapter 3. Installing the Oracle Agent 33 . Type the following commands to install the agent and the service group configuration wizard respectively: # swinstall -s /cdrom/depot VRTSvcsor # swinstall -s /cdrom/depot VRTScsocw Note Repeat step 1 through step 9 on each system that will become part of the Oracle service group.Installing the Agent Software 9.

Replace all resources of type Sqlnet with resources of type Netlsnr. 4.cf located under /etc/VRTSvcs/conf/config. a. 1. Remove the Oracle agent.cf from the backed up location to /etc/VRTSvcs/conf/config. 34 VCS Enterprise Agent for Oracle. Delete the file /etc/VRTSvcs/conf/config/OracleTypes. Start VCS on other nodes. 3. See “Installing the Agent Software” on page 31 for instructions. Verify the configuration # cd /etc/VRTSvcs/conf/config # hacf -verify 8. c.Upgrading the Agent Upgrading the Agent This section describes how to upgrade from the VCS enterprise agent 3. 5.cf.1 for Oracle.cf to a location on the cluster node. Copy the file OracleTypes. Follow step a through step c on all systems on which the Oracle agent was installed. 6. Install the VCS enterprise agent 4.5 for Oracle in a VCS cluster. See “Resource Type Definitions” on page 73 for information about the attributes in this version of the Oracle agent. 7. Back up the configuration file. Save the VCS configuration and stop the VCS engine. Installation and Configuration Guide . # haconf -dump -makero # hastop -all -force 2.cf from the directory /etc/VRTSvcs/conf/ to the /etc/VRTSvcs/conf/config directory. # swremove VRTSvcsor b. Start VCS on local node first. 9. Edit the main. main. Copy the main.

its resources. VCS provides several ways to configure an enterprise agent. Prerequisites ✔ Install and configure Oracle identically on all cluster systems. see “Installing and Configuring Oracle” on page 13. (For more information. 35 . You must have administrator privileges to create and configure a service group. Before configuring the agent. review the supported Oracle configurations. Review the Oracle resource type and the attribute definitions of the Oracle agents. including the agent configuration wizard. For sample configuration files of the Oracle service group. and the command-line. Cluster Manager (Java Console). and defining attribute values for the configured resources. described in “Resource Type Definitions” on page 73.) ✔ Make sure the Oracle services are not started on reboot by the init script. see “Installing the Oracle Agent” on page 31. (For more information.Configuring the Agent 4 Configuring the Oracle enterprise agent involves creating the Oracle service group. see “Sample Configurations” on page 79.) ✔ Verify that the Oracle agent is installed on all cluster systems. described under “Oracle Configurations in VCS” on page 36.

Configure Oracle for VCS. In the file listener. Review the Oracle and Netlsnr resource types and their attribute definitions. prod = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = prod) ) ) b. assuming that the host name for the database is set to oraprod. see “Single Oracle Instance Configuration” on page 80.ora as per VCS requirements. a. oraprod. ▼ To configure an Oracle instance in VCS 1.ora. For resource dependency graph and sample configuration of service groups involving a single Oracle instance. edit the “Host=” line in the ADDRESS_LIST section and add the name of the high availability address for the service group. Single Oracle Instance Configuration This section describes how to configure a single Oracle instance in a VCS environment for high availability. In the following example. depending on your Oracle configuration. Installation and Configuration Guide . Perform additional configuration tasks specific to the listener configuration. described in “Resource Type Definitions” on page 73.Oracle Configurations in VCS Oracle Configurations in VCS You can set up Oracle in different ways in a VCS environment. in the file tnsnames.ora and tnsnames.ora located at $TNS_ADMIN. For clients to connect to the failover instance. This section describes the changes required in these files. This involves configuring the Oracle files listener. 2. in this case. located at $TNS_ADMIN change the host name for all TCP protocol address databases to the virtual IP address for the service group. LISTENER_PROD = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = 36 VCS Enterprise Agent for Oracle. which represents the virtual IP address for the service group.

Oracle Configurations in VCS

(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) )

3. Create the Oracle service groups using the Agent Configuration wizard, Cluster Manager (Java Console,) or the command-line. For information on using the wizard, see “Configuring the Agent Using the Agent Configuration Wizard” on page 42. For information on using Cluster Manager (Java Console), see “Configuring the Agent Using Cluster Manager (Java Console)” on page 53. 4. Bring the Oracle service group online. See “Bringing the Service Group Online” on page 63 for instructions.

Multiple Oracle Instance (Single Listener) Configuration
This section describes how to configure multiple Oracle instances with a single listener in a VCS environment for high availability. For resource dependency graph and sample configuration of a service group involving multiple Oracle instances, see “Multiple Oracle Instances (Single Listener) Configuration” on page 83.

To configure multiple Oracle instances (single listener) 1. Review the Oracle and Netlsnr resource types and their attribute definitions, described in “Resource Type Definitions” on page 73. 2. Configure Oracle for VCS. This involves configuring the Oracle files listener.ora and tnsnames.ora as per VCS requirements. This section describes the changes required in these files, depending on your Oracle configuration. a. For clients to connect to the failover instance, in the file tnsnames.ora, located at $TNS_ADMIN change the host name for all TCP protocol address databases to the virtual IP address for the service group. In the following example, assuming that the host name for the database is set to oraprod, which represents the virtual IP address for the service group.
prod = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = prod) )

Chapter 4, Configuring the Agent

37

Oracle Configurations in VCS

b. Perform additional configuration tasks specific to the listener configuration. In the file listener.ora located at $TNS_ADMIN, edit the “Host=” line in the ADDRESS_LIST section and add the name of the high availability address for the service group, in this case, oraprod.
LISTENER_ORACLE = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1522)) )

3. Create the Oracle and Listener service groups using Cluster Manager (Java Console.) See “Configuring the Agent Using Cluster Manager (Java Console)” on page 53 for instructions. You can also use the command-line to create the service group. 4. Bring the Oracle service group online. See “Bringing the Service Group Online” on page 63 for instructions.

Multiple Oracle Instances (Multiple Listeners) Configuration
This section describes how to configure multiple Oracle instances with multiple listeners in VCS environment for high availability. For resource dependency graph and sample configuration of a service group involving multiple Oracle instance, see “Multiple Instance (Multiple Listeners) Configuration” on page 89.

To configure multiple Oracle instances (multiple listeners) 1. Review the Oracle and Netlsnr resource types and their attribute definitions, described in “Resource Type Definitions” on page 73. 2. Configure Oracle for VCS. This involves configuring the Oracle files listener.ora and tnsnames.ora as per VCS requirements. This section describes the changes required in these files, depending on your Oracle configuration. a. For clients to connect to the failover instance, in the file tnsnames.ora, located at $TNS_ADMIN change the host name for all TCP protocol address databases to the virtual IP address for the service group.
prod = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) (CONNECT_DATA =

38

VCS Enterprise Agent for Oracle, Installation and Configuration Guide

Oracle Configurations in VCS

(SERVICE_NAME = prod) ) ) mktg = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oramktg)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = mktg) ) )

b. In the file listener.ora, create independent configurations for each listener.
LISTENER_PROD = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) ) LISTENER_MKTG = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oramktg)(PORT = 1522)) ) )

3. Create the Oracle service groups using the Agent Configuration wizard, Cluster Manager (Java Console,) or the command-line. For information on using the wizard, see “Configuring the Agent Using the Agent Configuration Wizard” on page 42. For information on using Cluster Manager (Java Console), see “Configuring the Agent Using Cluster Manager (Java Console)” on page 53. 4. Bring the Oracle service group online. See “Bringing the Service Group Online” on page 63 for instructions.

Chapter 4, Configuring the Agent

39

ora and tnsnames. Perform additional configuration tasks specific to the listener configuration. in this case. assuming that the host name for the database is set to oraprod. a.Oracle Configurations in VCS Configuration With Shared Server Support This section describes how to configure Oracle instance having shared server support in a VCS environment for high availability. Configure Oracle for VCS. oraprod. In the file listener.ora as per VCS requirements. Review the Oracle and Netlsnr resource types and their attribute definitions.ora. For resource dependency graph and sample configuration.ora located at $TNS_ADMIN. In the following example. For clients to connect to the failover instance. This involves configuring the Oracle files listener. LISTENER_PROD = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1522)) ) ) 40 VCS Enterprise Agent for Oracle. This section describes the changes required in these files. see “Oracle Configuration With Shared Server Support” on page 94. Installation and Configuration Guide . 2. prod = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = prod) ) ) b. depending on your Oracle configuration. in the file tnsnames. described in “Resource Type Definitions” on page 73. located at $TNS_ADMIN change the host name for all TCP protocol address databases to the virtual IP address for the service group. ▼ To configure Oracle with shared server support 1. which represents the virtual IP address for the service group. edit the “Host=” line in the ADDRESS_LIST section and add the name of the high availability address for the service group.

the listener listener_alias uses TCP/IP port 1521 and the virtual IP address for the service group is oraprod. See “Bringing the Service Group Online” on page 63 for instructions. without the CONNECT_DATA portion of the connect descriptor. In the address parameter. set the host name for all TCP protocol address dispatchers to the virtual IP address for the service group. the host name for the dispatcher is set to oraprod. In the following example. In the initialization parameter file. the host name for the dispatcher is set to oraprod. Configuring the Agent 41 . 5. mts_dispatchers = "(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)) (MUL=ON)(TICK=15)(POOL=true)" In the following example from an Oracle9i configuration. In the file tnsnames. set the host name to the virtual IP address for the service group. For information on using Cluster Manager (Java Console). set the LOCAL_LISTENER attribute to a listener alias.ora. Chapter 4. for the mts_dispatchers (called dispatchers in Oracle9i versions and above) parameter. so that the Oracle PMON process registers information with the listener. listener_alias= (address = (PROTOCOL = TCP)(HOST = oraprod) (PORT= 1521)) 6. In the following example from an Oracle 8i configuration.Oracle Configurations in VCS 3. create an entry for the listener alias to resolve the address information. 7. Bring the Oracle service group online. see “Configuring the Agent Using Cluster Manager (Java Console)” on page 53. Cluster Manager (Java Console.) or the command-line.ora. Create the Oracle service groups using the Agent Configuration wizard. _listener=listener_alias This listener alias gets appended by the default domain set in the file sqlnet. dispatchers = "(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)) (MUL=ON)(TICK=15)(POOL=true)" 4. In the initialization parameter file.

The wizard creates and modifies Oracle service groups. listener. see “Modifying the Agent Configuration” on page 66. Prerequisites ✔ Make sure that the Oracle instances and listeners to be configured are running.cf File” on page 43 for instructions. to reside in $ORACLE_HOME/network/admin. Note For the default listener. Before configuring the Oracle agent. 42 VCS Enterprise Agent for Oracle. with user and password assigned. No such condition applies for non-default listeners. Installation and Configuration Guide . See “Importing the OracleTypes. see “Sample Configurations” on page 79. data. This section describes the steps required to create a new Oracle service group using the wizard. For sample configuration files and resource dependency graphs of the Oracle service group. ✔ The Oracle files (control. and archive files) must be on shared disks.ora must be the same. described in “Resource Type Definitions” on page 73. redo-log. All listeners to be configured must listen to the same virtual IP address.ora and tnsnames. the configuration wizard requires the listener parameter file. ✔ If detail monitoring is to be used for a database instance.ora. review the resource type and the attribute definitions of the Oracle and Netlsnr agents. ✔ The IP addresses and host names specified in the files listener. ✔ Make sure the Oracle type definition is imported to the VCS engine. To modify an existing service group. the table used for detail monitoring must be set up.Configuring the Agent Using the Agent Configuration Wizard Configuring the Agent Using the Agent Configuration Wizard VCS provides an Agent Configuration wizard that guides you through the process of configuring the agent.

cf file: include "OracleTypes. /etc/VRTSvcs/conf/OracleTypes. 5. ▼ To import using the Cluster Manager 1. Click Import. Start Cluster Manager and log on to the cluster.cf 4. 3.cf: # haconf -dump -makero 3.cf" Chapter 4. Log in to sysa as root.cf.cf file: # cd /etc/VRTSvcs/conf/config # cp main.cf file to include the OracleTypes. Save the configuration. 2. In the Import Types dialog box.cf /etc/VRTSvcs/conf/config/OracleTypes. From the Cluster Explorer’s File menu. issue the following command to stop the VCS engine on all systems and leave the resources available: # hastop -all -force 4. Configuring the Agent 43 . Ensure that all changes to the existing configuration have been saved and that further changes are prevented while you modify main. To ensure that VCS is not running while you edit main.cf main.cf File Before configuring the Oracle agent. choose Import Types.orig 5. 2. Edit the main.Configuring the Agent Using the Agent Configuration Wizard Importing the OracleTypes. Make a backup copy of the main. select the following file.cf file to the VCS engine. Copy the Oracle types configuration file into place: # cp /etc/VRTSvcs/conf/OracleTypes.cf. ▼ To import using the command line 1. you must import the OracleTypes.cf 6.

Set the DISPLAY variable. 3. start the Oracle configuration wizard as root. # hawizard oracle 2. Read the information on the Welcome screen and click Next. On the Wizard Options dialog box. On the Service Group Configuration dialog box.Configuring the Agent Using the Agent Configuration Wizard Instructions 1. 4. select the Create Oracle Service Group option and click Next. Installation and Configuration Guide . 44 VCS Enterprise Agent for Oracle. specify information about the service group.

In the Available Cluster Systems box. The system at the top of the list has the highest priority while the system at the bottom of the list has the lowest priority. Configuring the Agent 45 . Click Next. 5. Click Next. d. To change a system’s priority in the service group’s system list. On the Instance Selection dialog box. Chapter 4. if required.Configuring the Agent Using the Agent Configuration Wizard a. b. To remove a system from the service group’s system list. Click Discover Oracle Configuration. c. Enter a name for the Oracle service group. select the system in the Systems in Priority Order box and click the button with the left arrow icon. select the Oracle instances to be configured along with their listeners. select the system in the Systems in Priority Order box and click the buttons with the up and down arrow icons. select the systems on which to configure the service group and click the right-arrow icon to move the systems to the service group’s system list.

Verify the location of the Oracle Parameter File. specify information for all selected instances. 46 VCS Enterprise Agent for Oracle.Configuring the Agent Using the Agent Configuration Wizard 6. Installation and Configuration Guide . if desired. Choose Start and Stop options. if desired. Click Next. b. On the Instance Configuration dialog box. a. Select the Configure detail monitoring and Specify Advanced options check boxes. d. c.

Configuring the Agent 47 . Enter a valid password for the database user. d. Enter a valid user name for the database. a. b. Chapter 4. the wizard takes care of encrypting passwords. In the Select column. e.Configuring the Agent Using the Agent Configuration Wizard 7. enter the name of a table that will be queried to validate the status of the database. c. the Detail Monitoring dialog box is displayed. In the Table column. If you chose to monitor the database in detail. Click Next. select the check box corresponding to the database to be monitored in detail. Note Do not encrypt passwords when entering them through the Agent Configuration Wizard.

b. Enter the location of the Oracle Envfile and the encoding and select the AutoEndBkup check box. specify the Mount and Fsck options.Configuring the Agent Using the Agent Configuration Wizard 8. and click Next. 48 VCS Enterprise Agent for Oracle. On the Database Configuration dialog box. the Oracle Advanced Configuration dialog box is displayed. a. If you chose to specify advanced options. verify the mount points required by each database. 9. Click Next. Installation and Configuration Guide . if desired.

a. For each system. Select the Enable detail monitoring and Specify Advanced options. Click Next.Configuring the Agent Using the Agent Configuration Wizard 10. c. Chapter 4. d. Verify the virtual IP address and Netmask. b. On the Listener Configuration dialog box. if desired. select a device. Configuring the Agent 49 . configure the listeners for the databases.

if desired. the wizard takes care of encrypting passwords.Configuring the Agent Using the Agent Configuration Wizard 11. Enter a valid password for the listener. the Listener Advanced Configuration dialog box is displayed. Note Do not encrypt passwords when entering them through the Agent Configuration Wizard. Installation and Configuration Guide . For each listener. Click Next. If you chose to specify advanced options for the listeners. enter the path of the Envfile and encoding. 50 VCS Enterprise Agent for Oracle.

select the resource name and click on it.Configuring the Agent Using the Agent Configuration Wizard 12. if desired. Click on a resource to view its attributes and their configured values in the Attributes box. To edit a resource name. Review your configuration and click Finish. The wizard starts running commands to create the Oracle service group. a. On the Service Group Summary dialog. Change names of resources. b. Various messages indicate the status of these commands. Configuring the Agent 51 . press Enter after editing each attribute. review your configuration. Chapter 4. the wizard assigns unique names to resources based on their respective name rules.

52 VCS Enterprise Agent for Oracle. Click Close. The Oracle service group is created in your cluster. Installation and Configuration Guide . On the Completing the Oracle Configuration wizard dialog box.Configuring the Agent Using the Agent Configuration Wizard 13. select the Bring the service group online check box to bring the service group online on the local system.

Creating a New Service Group 1. you can view the template. d. b.Configuring the Agent Using Cluster Manager (Java Console) Configuring the Agent Using Cluster Manager (Java Console) A template for the Oracle resource groups is automatically installed when you install the Oracle enterprise agent. Cluster Explorer prompts you to launch the Cluster Configuration wizard. Chapter 4. select the system and click the left arrow. which displays the Oracle service group. select Tools>Configuration Wizard. Indicate the order in which the systems will fail over (priority).cf file to the VCS engine by using Cluster Manager. See “Importing the OracleTypes. If no service groups exist on the system. select the systems on which to configure the service group.cf File” on page 43 for instructions. On the Available Systems box. import the OracleTypes. The Loading Templates Information window appears. Specify the name of the service group and the target systems on which it is to be configured. its resources and their attributes. Click the right arrow to move the selected systems to the Systems for Service Group box. Click Next. 2. Enter the name of the service group. a. with 1 denoting the system that starts first following a failover. Read the information on the Welcome screen and click Next. System priority is numbered sequentially. 3. e. To use the Oracle template. Make sure the Oracle type definition file OracleTypes. You can dynamically modify the attribute values as necessary for your configuration. 4. Configuring the Agent 53 . and launches the wizard. To remove a system from the box. Using the VCS Cluster Manager. Click Yes when prompted. c.cf is imported in your configuration. Launch the Cluster Configuration wizard using any of the following two ways: ◆ ◆ From the Cluster Explorer menu.

Configuring the Agent Using Cluster Manager (Java Console) 5. 9. You can modify the default values of the resources according to your specific configuration requirements. A progress indicator displays the percentage of the commands fired. as instructed in the following section. select the OracleGroup template on which to base the service group. On the Select a template to configure the service group dialog box. click Next. The actual commands are displayed at the top of the indicator. If applicable. 6. You can select an alternative name. This window also includes a list of alternative names. Click Next to create the service group based on the selected template. its resources. A window opens listing the service group’s resources and their associated attributes. A window opens indicating that commands are being sent to add the group. 8. a window opens notifying you that names of some resources within the new service group are already in use. Installation and Configuration Guide . Click Finish to accept the default values and complete the configuration. or modify the name. 54 VCS Enterprise Agent for Oracle. Click Next when prompted that the service group has been successfully created. 7. On the Would you like to use a template to configure the service group? dialog box. and the attributes and dependencies specified in the template. Click Next after resolving the name clashes.

1. Click OK. Follow the wizard instructions to complete the configuration. Edit the attributes for all the resources according to your configuration. Repeat the procedure for each resource and its attributes and click Finish. Select the attribute to be modified. Click Finish to quit the wizard. Click the edit icon in the Edit column. 5. 3.Configuring the Agent Using Cluster Manager (Java Console) Editing Resource attributes Configure the Oracle service group by editing attributes of resources in the service group. 4. Its attributes appear in the right pane. enter the attribute values. 2. 6. Chapter 4. 7. To modify the scope of the attribute. Configuring the Agent 55 . Select the resource from the list on the left pane. click the option buttons for Global or Local. In the Edit Attribute dialog box.

Add an “include” line for the OracleTypes. Log in to sysa as root. Refer to the sample file /etc/VRTSvcs/conf/sample_oracle/main.cf.cf: # haconf -dump -makero 3.orig 5.cf can be used for reference: a.Configuring the Agent Using the Command-line Configuring the Agent Using the Command-line The VCS enterprise agent for Oracle comes with a sample configuration file that can be used as reference to directly modify your present configuration file. Installation and Configuration Guide . and the sample dependency graphs in “Sample Configurations” on page 79. Follow the instructions below to configure the agent using the sample configuration file: 1.cf 6.cf. (See the VERITAS Cluster Server User’s Guide for more information on assigning dependencies.) 56 VCS Enterprise Agent for Oracle. See “Resource Type Definitions” on page 73 for more information about the agent attributes.cf. 2. The file /etc/VRTSvcs/conf/sample_oracle/main. Ensure that all changes to the existing configuration have been saved and that further changes are prevented while you modify main. Assign dependencies to the newly created resources.cf main. d.cf file. Make a backup copy of the main.cf. To ensure that VCS is not running while you edit main.cf file: # cd /etc/VRTSvcs/conf/config # cp main. you must stop and restart VCS to implement the configuration. Copy the Oracle types configuration file into place: # cp /etc/VRTSvcs/conf/OracleTypes.cf file: include "OracleTypes. When you use this method. Create the Oracle and Netlsnr resources. c. Edit the default attributes to match the parameters in your configuration. Edit the main. You can refer to the examples shown in the file /etc/VRTSvcs/conf/sample_oracle/main. issue the following command to stop the VCS engine on all systems and leave the resources available: # hastop -all -force 4.cf /etc/VRTSvcs/conf/config/OracleTypes.cf" b.

9. Bring the service group online again and verify that all resources are available: # hagrp -online service_group -sys system_name # hagrp -state 13. Configuring the Agent 57 . On all the systems. Switch the Oracle service group to sysb: # hagrp -switch service_group -to sysb 15. Save and close the file.cf: # cd /etc/VRTSvcs/conf/config/ # hacf -verify .Configuring the Agent Using the Command-line 7. 8. Take the service group offline and verify that all resources are stopped: # hagrp -offline service_group -sys system_name # hagrp -state 12.log /var/VRTSvcs/log/Oracle_A.log Chapter 4. look at the following log files for any errors or status: /var/VRTSvcs/log/engine_A.log /var/VRTSvcs/log/Netlsnr_A. Verify that all Oracle service group resources are brought online: # hagrp -state 11. Start the VCS engine on sysb: # hastart 14. Verify that all Oracle service group resources are brought online on sysb: # hagrp -state 16. Verify the syntax of the file /etc/VRTSvcs/conf/config/main. Start the VCS engine: # hastart 10.

From the path $VCS_HOME/bin/. # Enter New Password: # Enter Again: 2.ora file. a. Enter the password and press Return. This password. when decrypted should be of the same format as stored in the listener. Installation and Configuration Guide .ora file.Configuring the Agent Using the Command-line Encrypting Passwords VCS provides a utility to encrypt database user passwords and listener passwords. in both clear text and encrypted formats. The utility encrypts the password and displays the encrypted password. 58 VCS Enterprise Agent for Oracle. The utility prompts you to enter the password twice. 1. run the vcsencrypt utility. Enter this encrypted password as the value for the attribute. Encrypt the Pword attribute in the Oracle agent and the LsnrPwd attribute in the Netlsnr agent before configuring these attributes. Irrespective of the format in which the password is stored in Oracle. Type the following command: # vcsencrypt -agent b. Note You need not encrypt passwords when using the configuration wizard or the VCS Cluster Manager (Java Console) to configure attributes. you must encrypt the password using the vcsencrypt utility before configuring the LsnrPwd attribute. 3. Oracle provides the option of storing the listener password in the listener. Copy the encrypted password for future reference.

In such circumstances. the agent executes the script defined in the attribute MonScript of the Oracle and Netlsnr resources. if an Oracle instance is started under the user “oraVRT” and the agent is configured for a user “oracle”. Chapter 4. an Oracle instance started under the context of another user cannot be detected as online. the agent monitors the Oracle processes to verify that they are continuously active. then such a conflict would go undetected. If the script successfully executes. This could lead to situations where: ◆ ◆ issuing a command to online a resource on a system might online an already running instance on that system (or any other system). the instance would come up.Additional Considerations with Basic Monitoring Additional Considerations with Basic Monitoring Basic monitoring of Oracle processes is user-specific. when the administrator onlines an Oracle resource on a system and if the Oracle instance is online on any other system within a cluster. the agent considers the resource available. However. Hence. In the detail monitoring mode. Setting Up Detail Monitoring The VCS enterprise agent for Oracle provides two levels of application monitoring: primary (basic monitoring) and secondary (detail monitoring). the agent will not detect the instance started by “oraVRT” as online. If in-depth monitoring is not configured. the database does not get mounted. Configuring the Agent 59 . For example. In the basic monitoring mode. within a failover service group. Note Disable detail monitoring before undertaking any database maintenance that involves disabling database access to external users. You can use the agent’s detail monitoring capability to monitor the status of a database and listener and increase the confidence in their availability. you must have the agent running satisfactorily at the basic level of monitoring. As a result. this failure is detected only by in-depth monitoring. VERITAS recommends that instances started outside VCS control be configured with the correct Owner attribute corresponding to the OS user for that instance. Before setting up detail monitoring. You can customize the default script according to your configuration.

In such a case. Set the environment variables for ORACLE_HOME and ORACLE_SID. Start the svrmgrl or sqlplus utility to set up a database table: $ORACLE_HOME/bin/svrmgrl or $ORACLE_HOME/bin/sqlplus /nolog 60 VCS Enterprise Agent for Oracle. based on the use of the supplied script. the monitor returns success. only basic monitoring occurs. Both scripts update the timestamp to monitor the database. or suspended mode. You can use a custom monitor script. you must create a test table (with a timestamp) in the Oracle database.pl script checks whether the database is open before updating the timestamp. MonScript. provided with the VCS enterprise agent for Oracle. or the scripts provided with the agent. If the database is found to be in restricted mode. In the monitor script. The update action is taken by the two scripts. 1. export ORACLE_HOME=<Home> export ORACLE_SID=<Sid> 5. The following example. Log on as an Oracle user. The SimpleTest. Before enabling detail monitoring for Oracle. shows how to create and test a table for use by detail monitoring. The SqlTest. Freeze the service group to avoid automated actions by VCS caused by an incomplete reconfiguration: hagrp -freeze service_group 3. Return codes from 101 to 110 indicate success. and how to enable detail monitoring.Setting Up Detail Monitoring Setting Up Detail Monitoring for Oracle Detail monitoring for an Oracle resource verifies whether a database is ready for transactions by performing an update transaction against a table within the database.pl script does not perform database checks but only issues update statements against the table. SqlTest.pl. quiesced mode.pl and SimpleTest. The detail monitor script. the return code 100 indicates failure. The scripts are available under the directory /opt/VRTSvcs/bin/Oracle/.<Owner> 4. must exist and have execute permission for root. Make the VCS configuration writable: haconf -makerw 2. Installation and Configuration Guide . su .

select TO_CHAR(tstamp. create table <User>. Detail monitoring for the Oracle resource can be enabled by using the following VCS commands: hares -modify OracleResource User User hares -modify OracleResource Pword Pword hares -modify OracleResource Table Table hares -modify OracleResource MonScript ".<Table> ( tstamp date ). do the following: disconnect connect <User>/<Pword> update <User>.<Table>./bin/Oracle/SqlTest. Chapter 4. insert into <User>. Configuring the Agent 61 . ’MON DD. As the database administrator.Setting Up Detail Monitoring 6.<Table> set ( tstamp ) = SYSDATE.pl" hares -modify OracleResource DetailMonitor 1 haconf -dump -makero hagrp -unfreeze service_group Note You can also use Cluster Manager (Java Console) to set these attributes. 7. grant create session to <User>. YYYY HH:MI:SS AM’) from <User>. To test the database table for use. issue the following statements at the svrmgrl or sqlplus prompt to create the test table: connect / as sysdba create user <User> identified by <Pword> default tablespace USERS temporary tablespace TEMP quota 100K on USERS.<Table> (tstamp) values (SYSDATE). exit 8.

set the DetailMonitor attribute to 0. Enable detail monitoring by entering the following commands: hares -modify LsnrResource MonScript "./bin/Netlsnr/LsnrTest.pl" haconf -dump -makero hagrp -unfreeze service_group 4. /opt/VRTSvcs/bin/Netlsnr/LsnrTest. hares -modify OracleResource DetailMonitor 0 Setting Up Detail Monitoring for Netlsnr You can enable detail monitoring for Netlsnr by specifying a value for the MonScript attribute.pl. Freeze the service group to avoid automated actions by VCS caused by an incomplete reconfiguration: hagrp -freeze service_group 3. hares -modify OracleResource DetailMonitor 1 To disable detail monitoring. The detail monitoring script for the Netlsnr resource uses the Listener command lsnrctl status $Listener to test the Listener process. set the DetailMonitor attribute to 1. 1. The following example uses the supplied monitor script for Netlsnr. Make the VCS configuration writable: haconf -makerw 2. Disable detail monitoring by setting the MonScript attribute to an empty string: haconf -makerw hagrp -freeze service_group hares -modify SqlResource MonScript "" haconf -dump -makero hagrp -unfreeze 62 VCS Enterprise Agent for Oracle.Setting Up Detail Monitoring Enabling and Disabling Detail Monitoring for Oracle To enable detail monitoring. Installation and Configuration Guide .

Bringing the Service Group Online 1. 5.Administering the Oracle Service Group 5 This chapter describes some administrative tasks you can perform on the Oracle service group. switching it. This enables all resources in the service group. 3. In the Cluster Explorer configuration tree. Right-click the service group and select to online the service group on the system (Right-click>Online>system_name). select the newly created service group. including bringing the service group online. Right-click the service group name. Save your configuration (File>Close Configuration). 2. Right-click the service group name. The chapter also describes how to disable the agent and to remove it. and modifying the service group configuration. and select the systems on which to enable the service group (Right-click>Enable>system_name or Right-click>Enable>All). 4. and select Enable Resources. taking it offline. 63 .

and right-click the service group icon in the view panel. Choose Offline. 64 VCS Enterprise Agent for Oracle. or Select the cluster in the Cluster Explorer configuration tree. select the Service Groups tab. Installation and Configuration Guide . In the Service Groups tab of the Cluster Explorer configuration tree. or Select the cluster in the Cluster Explorer configuration tree. and choose the appropriate system from the pop-up menu (Right-click>Offline>system_name). In the Service Groups tab of the Cluster Explorer configuration tree. right-click the service group. and choose the appropriate system from the pop-up menu (Right-click>Switch To>system_name). Choose Switch To. select the Service Groups tab. 2. right-click the service group. and right-click the service group icon in the view panel. Taking the Service Group Offline 1.Switching the Service Group Switching the Service Group The process of switching a service group involves taking it offline on its current system and bringing it online on another system. 2. 1.

” check the file /var/VRTSvcs/log/engine_A. you can use the -switch option: hagrp -switch service_group -to system_name b. See the chapter on reconfiguring VCS from the command line in the VERITAS Cluster Server User’s Guide for more information. To take the service group offline on one system and online it on another system. You can now remove the service group. You can also use the ps command to confirm the agent is stopped. Use one of the following commands: a. take it offline.log for a message confirming the agent has stopped.Disabling the Agent Disabling the Agent To disable the agent. To take the service group offline without bringing it online on any other system in the cluster. Stop the agent on the system by entering: haagent -stop Oracle -sys system_name When you get the message “Please look for messages in the log file. the resource type. You can stop the application completely or switch the agent to another system. or both from the VCS configuration. Administering the Oracle Service Group 65 . check if the service group is online: hagrp -state service_group -sys system_name 2. enter: hagrp -offline service_group -sys system_name 3. you must change the Oracle service group to an OFFLINE state. Chapter 5. To remove a system from the service group’s SystemList. If the service group is online. 1.

select the service group to be modified. 4. Read the information on the Welcome screen and click Next. the command-line interface. and click Next. Remove the agent configuration wizard. # hawizard oracle 2. Remove the agent. 3. 1. Installation and Configuration Guide . Answer prompts accordingly. and the Web Console. Removing the Agent Removing the agent involves removing the agent configuration wizard and the agent files from each system. Follow the wizard instructions and make modifications as per your configuration. Start the Oracle Configuration wizard.Modifying the Agent Configuration Modifying the Agent Configuration You can dynamically configure the VCS enterprise agent for Oracle in several ways. Cluster Manager Java Console. # swremove VRTScsocw 2. On the Wizard Options dialog box. See “Configuring the Agent Using the Agent Configuration Wizard” on page 42 for more information about the configuration wizard. # swremove VRTSvcsor 66 VCS Enterprise Agent for Oracle. including the configuration wizard. select the Modify service group option. This section describes the process using the cluster configuration wizard. 1.

not readable. if available. 6 Error Messages Common to the Oracle and Netlsnr Agents Message No ORACLE_HOME specified Description and Solution The Home attribute in the Oracle or Netlsnr type has not been set. Solution: Contact Technical Support for further assistance. File %s is not a valid text file The file specified by the EnvFile attribute for sourcing the environment variables is not present. Solution: Contact Technical Support for further assistance. Solution: Set the Home attribute to the correct full path name of the Oracle home. Messages include the description and a recommended solution. Solution: Set the EnvFile attribute to the correct full path name. Unable to open pipe from %s 67 .Troubleshooting This chapter lists error messages associated with the VCS enterprise agent. Solution: Set the Home attribute to the correct full path name of the Oracle home. Ensure that the file format is valid. Oracle home directory %s does not exist The string specified for the Home attribute in the Oracle or Netlsnr type is incorrect. Internal error. VCSAgExec returned failure when trying to execute in-depth test Internal error. or is not a text file.

The detailed monitoring script returns the output specified in the message when the status is offline or unknown. Occurs in MonScript file. Source file for environment variables %s is not a valid text file No owner for Oracle executables was specified The Owner attribute in the Oracle type has not been set. Monitor procedure %s did not exit. Solution: Debug MonScript to assess the exact cause of failure. 68 VCS Enterprise Agent for Oracle. Execution of script returned %s Monitor procedure %s returned %s MonScript failed to execute correctly. Solution: Set the Owner attribute to the correct owner of the database binaries. Solution: Contact Technical Support for further assistance. Solution: Set the EnvFile attribute to the correct full path name. not readable. return value is %s Internal error while executing MonScript.Error Messages Common to the Oracle and Netlsnr Agents Message Process %s restarted Description and Solution Warning message to indicate that the PID for the Oracle process specified is different than the one registered by the previous monitor cycle. or is not a text file. Solution: Take corrective action for the error that has occurred. Invalid owner %s for Oracle executables was specified The OS user specified by the Owner attribute is invalid. Ensure that the file format is valid. Solution: Set the Owner attribute to the correct owner of the database binaries. The file specified by the EnvFile attribute for sourcing the environment variables is not present. Installation and Configuration Guide .

Oracle (%s) kill KILL %s Warning message to indicate that the Oracle processes would be signaled with SIGKILL. Warning message to indicate that the database instance was not running even before the clean or offline entry points were executed. svrmgrl/sqlplus not found in %s/bin The client utilities svrmgrl or sqlplus are not found in the $ORACLE_HOME/bin directory. Troubleshooting 69 . Oracle database is in backup mode Warning message to indicate that the database is in backup mode. Oracle (%s) kill TERM %s Warning message to indicate that the Oracle processes would be signaled with SIGTERM.Error Messages Specific to the Oracle Agent Error Messages Specific to the Oracle Agent Message No SID specified Description and Solution The Sid attribute in the Oracle type has not been set. Oracle instance %s not running Chapter 6. Solution: If the AutoEndBkup attribute is set then the database files that are being backed up will be taken out of backup mode and the database will be opened. Solution: Verify that the Oracle home has been correctly specified and that these executables are present. Solution: Set the Sid attribute to the correct database instance. Oracle %s failed to stop Warning message to indicate that Shutdown immediate or Shutdown abort commands were not successful in closing the Oracle instance. in the clean or offline entry point. Solution: No action required. No initialization parameter file specified for startup The Pfile attribute in the Oracle type has not been set. Solution: No action required. Solution: Set the Pfile attribute to the correct full path name corresponding to the instance specified by Sid attribute. Solution: No action required.

70 VCS Enterprise Agent for Oracle. One possible reason could be that automatic archiving was not enabled while setting up the database.dat did not have records that could be parsed The agent could not find the custom script at the specified location to start the database. oraerror. Database in SUSPENDED state Resource %s .dat is not present or has records in an unsupported format.sql does not exist. Solution: Make sure the custom file exists at the specified location and has valid permissions. Refer to Oracle’s alert log for more information. The agent could not find the custom script at the specified location to stop the database. Custom script $VCS_HOME/bin/Oracle/shut_custo m_%s. Warning message to indicate that database is in SUSPENDED state. Installation and Configuration Guide . Warning message to indicate that database is in RESTRICTED mode. set the LOG_ARCHIVE_START parameter in the file init.sql does not exist. Warning message to indicate that database is in QUIESCING or QUIESCED mode.monitor procedure did not complete within the expected time.ora to TRUE. Custom script $VCS_HOME/bin/Oracle/start_cust om_%s. Solution: Make sure the custom file exists and the specified location and has valid permissions. Solution: Archive the database manually. Solution: Make sure the file exists and has data in the supported format.Error Messages Specific to the Oracle Agent Message Oracle (%s) failed to stop even after SIGKILL Description and Solution Oracle processes could not be terminated even with SIGKILL. Using default shutdown option. The file oraerror. If automatic archival is enabled. Will not be able to start the database. Solution: Contact your Oracle Administrator for assistance. Oracle (%s) attempting cleanup of Oracle IPC resources Database in QUIESCING/QUIESCED mode Database in RESTRICTED mode Warning message to indicate that the IPC resources are being cleaned.

Solution: No action required. Solution: Contact your Oracle Administrator for assistance.Error Messages Specific to the Netlsnr Agent Error Messages Specific to the Netlsnr Agent Message Cannot open process directory. Solution: Verify that the Oracle home has been correctly specified and that this executable is present. Listener %s kill TERM %s Warning message to indicate that the Listener process would be signaled with SIGTERM. Chapter 6. Description and Solution The agent could not process the /proc entries in the particular monitor cycle. Listener process %s not running Warning message to indicate that the Listener process was not running even before the clean or offline entry points were executed. Solution: No action required. lsnrctl operation timed out The tnslsnr process is not responding. Solution: Verify the underlying network protocol. Troubleshooting 71 . Solution: No action required. Listener %s failed to stop even after SIGKILL Listener process could not be terminated even with SIGKILL. lsnrctl not found in %s/bin The client utility lsnrctl is not found in the $ORACLE_HOME/bin directory. Solution: No action required. Listener %s kill KILL %s Warning message to indicate that the Listener process would be signaled with SIGKILL.

Installation and Configuration Guide .Error Messages Specific to the Netlsnr Agent 72 VCS Enterprise Agent for Oracle.

User. AutoEndBkup. DBSuspend.cf./bin/Oracle/SqlTest. The Required attributes table lists the attributes that must be configured for the agent to function properly.Resource Type Definitions A This appendix lists the resource type definitions and attribute definitions of the Oracle and Netlsnr agents. DBRestrict. The resource type represents the VCS configuration definition of the agent and specifies how the agent is defined in the configuration file main.pl" str User str Pword str Table boolean AgentDebug = 0 str Encoding ) 73 . Pfile. DetailMonitor. ShutDownOpt. Oracle Resource Type type Oracle ( static keylist SupportedActions = { VRTS_GetInstanceName. StartUpOpt. DBUndoRestrict. DBTbspBackup } static str ArgList[] = { Sid. AgentDebug. Table. Pword. Home. Owner. Encoding } str Sid str Owner str Home str Pfile str StartUpOpt = STARTUP str ShutDownOpt = IMMEDIATE str EnvFile boolean AutoEndBkup = 1 int DetailMonitor str MonScript = ". MonScript. The Attribute Definitions table explains the attributes associated with the agent. EnvFile. DBResume. VRTS_GetRunningServices.

as the defined owner of executables and database files in /etc/passwd. Note Do not append a slash (/) at the end of the path. The $ORACLE_HOME path to Oracle binaries and configuration files. Owner string-scalar Home string-scalar 74 VCS Enterprise Agent for Oracle. Installation and Configuration Guide . For example. you could specify the path as /opt/ora_home. The Oracle user.Oracle Resource Type Attribute Definitions Required Attributes Sid Type and Dimension string-scalar Definition The variable $ORACLE_SID that represents the Oracle instance. The Sid is considered case-sensitive by the Oracle agent and by the Oracle database server.

Resource Type Definitions 75 . The syntax for the contents of the file depends on the login shell of Owner. You can also use the server parameter file. File must be readable by Owner. This attribute can take the following values: ◆ ◆ ◆ ◆ ◆ STARTUP RESTRICTED RECOVERDB SRVCTLSTART CUSTOM Default is STARTUP. Pfile string-scalar The name of the initialization parameter file with the complete path of the startup profile.Oracle Resource Type Optional Attributes StartUpOpt Type and Dimension string-scalar Definition Startup options for the Oracle instance. AutoEndBkup integer-scalar Setting the AutoEndBkup attribute to a non-zero value takes the datafiles in the database out of the backup mode. Create a one-line text initialization parameter file that contains only the SPFILE parameter. This file contains the environment variables set by the user for the Oracle database server environment such as LD_LIBRARY_PATH. EnvFile string-scalar The full path name of the file that is sourced by the entry point scripts. This attribute can take the following values: ◆ ◆ ◆ ◆ IMMEDIATE TRANSACTIONAL SRVCTLSTOP CUSTOM Default is IMMEDIATE. and so on. Default = 1 Appendix A. during Online. ShutDownOpt string-scalar Shut down options for the Oracle instance. See the Oracle documentation for more information. The file must not contain any prompts for user input. NLS_DATE_FORMAT.

Specifies operating system encoding that corresponds to Oracle encoding for the displayed Oracle output. as in the path . A relative pathname should start with “./bin/Oracle/SqlTest. The value indicates the number of monitor cycles after which the agent will monitor Oracle in detail. User string-scalar Internal database user. Encrypted password for internal database-user authentication. The default (basic monitoring) is to monitor the database PIDs only. Additional debug messages are logged when this flag is set. described on “Encrypting Passwords” on page 58. The default is “”.pl.Oracle Resource Type Optional Attributes DetailMonitor Type and Dimension integer-scalar Definition Setting this flag to a non-zero enables detail monitoring for Oracle. Connects to the database for detail monitoring. For example. Default = 0 AgentDebug boolean-scalar 76 VCS Enterprise Agent for Oracle./”. Default = 0 MonScript string-scalar Pathname to the script provided for detail monitoring. MonScript also accepts a pathname relative to $VCS_HOME. The pathname to the supplied detail monitor script is /opt/VRTSvcs/bin/Oracle/SqlTest. the value 5 indicates that the agent will monitor Oracle in detail every five monitor intervals.pl. Installation and Configuration Guide . Passwords must be encrypted using the VCS Encrypt utility. Encrypt passwords only when entering them using the command-line. Pword string-scalar Table Encoding string-scalar string-scalar Table for update by User/Pword.

VRTS_GetRunningServices } static str ArgList[] = { Owner. Encoding } str Owner str Home str TnsAdmin str Listener str EnvFile str MonScript = ". For example. Home. Do not append a slash (/) at the end of the path. EnvFile. Resource Type Definitions 77 . The default is LISTENER. MonScript. AgentDebug. The $ORACLE_HOME path to Oracle binaries and configuration files. as the defined owner of executables and database files in /etc/passwd.ora). LsnrPwd.pl" str LsnrPwd boolean AgentDebug = 0 str Encoding ) Attribute Definitions Required Attributes Owner Type and Dimension string-scalar Definition Oracle user./bin/Netlsnr/LsnrTest.Netlsnr Resource Type Netlsnr Resource Type type Netlsnr ( static keylist SupportedActions = { VRTS_GetInstanceName. Name of Listener. Listener. The default is /var/opt/oracle. Home string-scalar TnsAdmin string-scalar The $TNS_ADMIN path to directory in which the Listener configuration file resides (listener. The name for Listener is considered case-insensitive by the Netlsnr agent and the Oracle database server. TnsAdmin. you could specify the path as /opt/ora_home. Listener string-scalar Appendix A.

The default is “”./”.pl. MonScript also accepts a pathname relative to $VCS_HOME. Optional Attributes EnvFile Type and Dimension string-scalar Definition Specifies the full path name of the file that is sourced by the entry point scripts. This file contains the environment variables set by the user for the Oracle listener environment such as LD_LIBRARY_PATH and so on. Default = 0 AgentDebug boolean Note Detail Monitoring is disabled if the value of the attribute MonScript is invalid or is set to an empty string. A relative pathname should start with “. 78 VCS Enterprise Agent for Oracle. The default (basic monitoring) is to monitor the listener process only. Installation and Configuration Guide . Additional debug messages are logged when this flag is set.Netlsnr Resource Type Required Attributes LsnrPwd Type and Dimension string-scalar Definition The VCS encrypted password used to stop and monitor the listener. described on “Encrypting Passwords” on page 58./bin/Netlsnr/LsnrTest. as in the path . The pathname to the supplied detail monitoring script is $VCS_HOME/bin/Netlsnr/LsnrTest.pl. Encrypt passwords only when entering them using the command-line. The file must not contain any prompts for user input. MonScript string-scalar Pathname to the script provided for detail monitoring. Passwords must be encrypted using the VCS Encrypt utility. Encoding string-scalar Specifies operating system encoding that corresponds to Oracle encoding for the displayed Oracle output. This password is set in the Listener configuration file. This file must readable by Owner. The syntax for the contents of the file depends on the login shell of Owner.

The appendix describes the following configurations ◆ ◆ ◆ ◆ “Single Oracle Instance Configuration” on page 80 “Multiple Oracle Instances (Single Listener) Configuration” on page 83 “Multiple Instance (Multiple Listeners) Configuration” on page 89 “Oracle Configuration With Shared Server Support” on page 94 79 . and resource dependencies within the service group. Review these dependencies carefully before configuring the agent. The sample configuration file (main. resources. see the VERITAS Cluster Server Bundled Agents Reference Guide.Sample Configurations B This appendix describes typical service groups configured to monitor the state of Oracle in a VCS cluster. The sample dependency graphs depict the resource types. For more information about VCS resource types.cf) is also included for your reference.

cf" cluster vcs ( ) system vcshp1 ( ) system vcshp2 ( 80 VCS Enterprise Agent for Oracle. The virtual IP address for the service group is configured using the IP and NIC resource types. Sample Configuration include "types.Single Oracle Instance Configuration Single Oracle Instance Configuration The following example describes a typical service group configured to monitor the state of an Oracle instance in a VCS cluster. Netlsnr LSNR_oraprod_lsnr ORA_oraprod Oracle Mount_oraprod_u02 IP Mount Mount IP_oraprod Mount_oraprod_u01 Vol_oraprod_vol2 Volume Volume NIC_oraprod NIC Vol_oraprod_vol1 DiskGroup DG_oraprod The shared disk groups and volumes in the cluster are configured as resources of type DiskGroup and Volume respectively.cf" include "OracleTypes. Installation and Configuration Guide . use the DiskReservation resource type to configure shared storage instead of the DiskGroup and Volume resource types. If your configuration does not use VERITAS Volume Manager. The volumes are mounted using the Mount agent. The Oracle server can be started after each of these resources is brought online.

/bin/Netlsnr/LsnrTest.Single Oracle Instance Configuration ) group ORA_PROD_Group ( SystemList = { vcshp1 = 0.13" ) Mount Mount_oraprod_u01 ( MountPoint = "/prod/u01" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Mount Mount_oraprod_u02 ( MountPoint = "/prod/u02" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) NIC NIC_oraprod ( Device = lan0 ) Netlsnr LSNR_oraprod_lsnr ( Owner = oraprod Home = "/prod/u01/oracle/product/8.pl" ) Appendix B.5" TnsAdmin = "/prod/u01/oracle/network/admin" Listener = LISTENER_PROD MonScript = ". Sample Configurations 81 .1. vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oraprod ( DiskGroup = ora_prod_dg StartVolumes = 0 StopVolumes = 0 ) IP IP_oraprod ( Device = lan0 Address = "10.212.102.

pl" User = thor Pword = hvlTptWvj Table = thor ) Volume Vol_oraprod_vol1 ( Volume = u01-vol DiskGroup = ora_prod_dg ) Volume Vol_oraprod_vol2 ( Volume = u02-vol DiskGroup = ora_prod_dg ) IP_oraprod requires NIC_oraprod LSNR_oraprod_lsnr requires IP_oraprod LSNR_oraprod_lsnr requires ORA_oraprod Mount_oraprod_u01 requires Vol_oraprod_vol1 Mount_oraprod_u02 requires Vol_oraprod_vol2 ORA_oraprod requires Mount_oraprod_u01 ORA_oraprod requires Mount_oraprod_u02 Vol_oraprod_vol1 requires DG_oraprod Vol_oraprod_vol2 requires DG_oraprod 82 VCS Enterprise Agent for Oracle.1. Installation and Configuration Guide ./bin/Oracle/SqlTest.sh" DetailMonitor = 1 MonScript = ".5" Pfile = "/prod/u01/oracle/admin/pfile/initPROD.Single Oracle Instance Configuration Oracle ORA_oraprod ( Sid = PROD Owner = oraprod Home = "/prod/u01/oracle/product/8.ora" EnvFile = "/tmp/env.

ORA_oramktg Oracle Mount_oramktg_u01 Mount Mount_oramktg_u02 Mount Vol_oramktg_vol1 Volume Vol_oramktg_vol2 Volume DiskGroup Ora_DG_Bin Appendix B. The Listener too is configured in a separate service group. The volumes are mounted using the Mount agent. Sample Configurations 83 . the shared disk groups and volumes in the cluster are configured as resources of type DiskGroup and Volume respectively. This configuration has a service group for each Oracle instance. In the Oracle service group. ORA_MKTG_Group ORA_PROD_Group Online Local Firm LISTENER SERVICE GROUP The Oracle service groups are made dependent on the Listener service group using an Online Local Firm dependency.Multiple Oracle Instances (Single Listener) Configuration Multiple Oracle Instances (Single Listener) Configuration The following example describes a typical VCS configuration to monitor two Oracle instances sharing a listener.

LSNR_oracle Netlsnr IP_oraprod IP Mount Mount_orabin Vol_orabin Volume NIC_Public1 DG_orabin NIC DiskGroup The Oracle server can be started after the Listener service group and the resources in the Oracle service group are brought online. Also ensure a single system is capable of sustaining a multiple instance load in the event of a server failure and extended operation on the backup server.cf" cluster vcs ( ) system vcshp1 ( ) system vcshp2 ( 84 VCS Enterprise Agent for Oracle.Multiple Oracle Instances (Single Listener) Configuration In the Listener service group. Pay particular attention to system requirements like physical memory and shared memory segment availability. the virtual IP address is configured using the IP and NIC resource types. and /etc/shadow to support multiple databases. Sample Configuration include "types. Installation and Configuration Guide . Note In this case. make sure you have modified all proper system files. use the DiskReservation resource type to configure shared storage instead of the DiskGroup and Volume resource types. The Listener can be started after the IP and NIC resources are brought online.cf" include "OracleTypes. /etc/group. If your configuration does not use VERITAS Volume Manager. such as /etc/system. /etc/passwd.

sh" DetailMonitor = 1 MonScript = ".Multiple Oracle Instances (Single Listener) Configuration ) group ORA_MKTG_Group ( SystemList = { vcshp1 = 0.ora" EnvFile = "/tmp/env.1. vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oramktg ( DiskGroup = ora_mktg_dg StartVolumes = 0 StopVolumes = 0 ) Mount Mount_oramktg_u01 ( MountPoint = "/mktg/u01" BlockDevice = "/dev/vx/dsk/ora_mktg_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Mount Mount_oramktg_u02 ( MountPoint = "/mktg/u02" BlockDevice = "/dev/vx/dsk/ora_mktg_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) Oracle ORA_oramktg ( Sid = MKTG Owner = oramktg Home = "/orahome/u01/oracle/product/8./bin/Oracle/SqlTest.pl" User = thor Pword = hvlTptWvj Table = thor ) Volume Vol_oramktg_vol1 ( Volume = u01-vol DiskGroup = ora_mktg_dg ) Volume Vol_oramktg_vol2 ( Volume = u02-vol DiskGroup = ora_mktg_dg Appendix B.5" Pfile = "/orahome/u01/oracle/admin/pfile/initMKTG. Sample Configurations 85 .

1.pl" User = thor Pword = hvlTptWvj Table = thor ) 86 VCS Enterprise Agent for Oracle. Installation and Configuration Guide ./bin/Oracle/SqlTest.5" Pfile = "/orahome/u01/oracle/admin/pfile/initPROD. vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oraprod ( DiskGroup = ora_prod_dg StartVolumes = 0 StopVolumes = 0 ) Mount Mount_oraprod_u01 ( MountPoint = "/prod/u01" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Mount Mount_oraprod_u02 ( MountPoint = "/prod/u02" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) Oracle ORA_oraprod ( Sid = PROD Owner = oraprod Home = "/orahome/u01/oracle/product/8.sh" DetailMonitor = 1 MonScript = ".ora" EnvFile = "/tmp/env.Multiple Oracle Instances (Single Listener) Configuration ) requires group Common_Service online firm Mount_oramktg_u01 requires Vol_oramktg_vol1 Mount_oramktg_u02 requires Vol_oramktg_vol2 ORA_oramktg requires Mount_oramktg_u01 ORA_oramktg requires Mount_oramktg_u02 Vol_oramktg_vol1 requires DG_oramktg Vol_oramktg_vol2 requires DG_oramktg group ORA_PROD_Group ( SystemList = { vcshp1 = 0.

vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_orabin ( DiskGroup = ora_bin_dg StartVolumes = 0 StopVolumes = 0 ) IP IP_oraprod ( Device = lan0 Address = "10. Sample Configurations 87 .13" ) Mount Mount_orabin ( MountPoint = "/orahome/u01" BlockDevice = "/dev/vx/dsk/ora_bin_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) NIC NIC_Public1 ( Device = lan0 ) Appendix B.212.Multiple Oracle Instances (Single Listener) Configuration Volume Vol_oraprod_vol1 ( Volume = u01-vol DiskGroup = ora_prod_dg ) Volume Vol_oraprod_vol2 ( Volume = u02-vol DiskGroup = ora_prod_dg ) requires group Common_Service online firm Mount_oraprod_u01 requires Vol_oraprod_vol1 Mount_oraprod_u02 requires Vol_oraprod_vol2 ORA_oraprod requires Mount_oraprod_u01 ORA_oraprod requires Mount_oraprod_u02 Vol_oraprod_vol1 requires DG_oraprod Vol_oraprod_vol2 requires DG_oraprod group Common_Service ( SystemList = { vcshp1 = 0.102.

Installation and Configuration Guide ./bin/Netlsnr/LsnrTest.5" TnsAdmin = "/orahome/u01/oracle/network/admin" Listener = LISTENER_ORACLE MonScript = ".Multiple Oracle Instances (Single Listener) Configuration Netlsnr LSNR_oracle ( Owner = oracle Home = "/orahome/u01/oracle/product/8.1.pl" ) Volume Vol_orabin ( Volume = u01-vol DiskGroup = ora_bin_dg ) IP_oraprod requires NIC_Public1 LSNR_oracle requires IP_oraprod LSNR_oracle requires Mount_orabin Mount_orabin requires Vol_orabin Vol_orabin requires DG_orabin 88 VCS Enterprise Agent for Oracle.

cf" include "OracleTypes. Sample Configurations 89 .cf" cluster vcs ( ) system vcshp1 ( ) system vcshp2 ( ) group ORA_MKTG_Group ( SystemList = { vcshp1 = 0.102. Sample Configuration File include "types. Each Oracle instance is configured in a separate service group.212. The resource dependencies are similar to those described in the “Single Oracle Instance Configuration” on page 80.14" ) Mount Mount_oramktg_u01 ( MountPoint = "/mktg/u01" BlockDevice = "/dev/vx/dsk/ora_mktg_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Appendix B. vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oramktg ( DiskGroup = ora_mktg_dg StartVolumes = 0 StopVolumes = 0 ) IP IP_oramktg ( Device = lan0 Address = "10.Multiple Instance (Multiple Listeners) Configuration Multiple Instance (Multiple Listeners) Configuration This configuration has several single-instance configurations.

1.5" Pfile = "/mktg/u01/oracle/admin/pfile/initMKTG.5" TnsAdmin = "/mktg/u01/oracle/network/admin" Listener = LISTENER_MKTG MonScript = ".1./bin/Netlsnr/LsnrTest.ora" EnvFile = "/tmp/env.Multiple Instance (Multiple Listeners) Configuration Mount Mount_oramktg_u02 ( MountPoint = "/mktg/u02" BlockDevice = "/dev/vx/dsk/ora_mktg_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) Netlsnr LSNR_oramktg_lsnr ( Owner = oramktg Home = "/mktg/u01/oracle/product/8. Installation and Configuration Guide ./bin/Oracle/SqlTest.pl" ) Oracle ORA_oramktg ( Sid = MKTG Owner = oramktg Home = "/mktg/u01/oracle/product/8.sh" DetailMonitor = 1 MonScript = ".pl" User = thor Pword = hvlTptWvj Table = thor ) Proxy NICProxy_oramktg ( TargetResName = NIC_Public1 ) Volume Vol_oramktg_vol1 ( Volume = u01-vol DiskGroup = ora_mktg_dg ) Volume Vol_oramktg_vol2 ( Volume = u02-vol DiskGroup = ora_mktg_dg ) 90 VCS Enterprise Agent for Oracle.

102. vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oraprod ( DiskGroup = ora_prod_dg StartVolumes = 0 StopVolumes = 0 ) IP IP_oraprod ( Device = lan0 Address = "10. Sample Configurations 91 .212.Multiple Instance (Multiple Listeners) Configuration IP_oramktg requires NICProxy_oramktg LSNR_oramktg_lsnr requires IP_oramktg LSNR_oramktg_lsnr requires ORA_oramktg Mount_oramktg_u01 requires Vol_oramktg_vol1 Mount_oramktg_u02 requires Vol_oramktg_vol2 ORA_oramktg requires Mount_oramktg_u01 ORA_oramktg requires Mount_oramktg_u02 Vol_oramktg_vol1 requires DG_oramktg Vol_oramktg_vol2 requires DG_oramktg group ORA_PROD_Group ( SystemList = { vcshp1 = 0.13" ) Mount Mount_oraprod_u01 ( MountPoint = "/prod/u01" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Mount Mount_oraprod_u02 ( MountPoint = "/prod/u02" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) Appendix B.

ora" EnvFile = "/tmp/env.sh" DetailMonitor = 1 MonScript = "./bin/Netlsnr/LsnrTest.5" TnsAdmin = "/prod/u01/oracle/network/admin" Listener = LISTENER_PROD MonScript = ".pl" User = thor Pword = hvlTptWvj Table = thor ) Proxy NICProxy_oraprod ( TargetResName = NIC_Public1 ) Volume Vol_oraprod_vol1 ( Volume = u01-vol DiskGroup = ora_prod_dg ) Volume Vol_oraprod_vol2 ( Volume = u02-vol DiskGroup = ora_prod_dg ) IP_oraprod requires NICProxy_oraprod LSNR_oraprod_lsnr requires IP_oraprod LSNR_oraprod_lsnr requires ORA_oraprod Mount_oraprod_u01 requires Vol_oraprod_vol1 Mount_oraprod_u02 requires Vol_oraprod_vol2 ORA_oraprod requires Mount_oraprod_u01 ORA_oraprod requires Mount_oraprod_u02 Vol_oraprod_vol1 requires DG_oraprod Vol_oraprod_vol2 requires DG_oraprod 92 VCS Enterprise Agent for Oracle. Installation and Configuration Guide .pl" ) Oracle ORA_oraprod ( Sid = PROD Owner = oraprod Home = "/prod/u01/oracle/product/8.5" Pfile = "/prod/u01/oracle/admin/pfile/initPROD./bin/Oracle/SqlTest.1.1.Multiple Instance (Multiple Listeners) Configuration Netlsnr LSNR_oraprod_lsnr ( Owner = oraprod Home = "/prod/u01/oracle/product/8.

Sample Configurations 93 . vcshp2 = 1 } Parallel = 1 AutoStartList = { vcshp1.Multiple Instance (Multiple Listeners) Configuration group Parallel_Service ( SystemList = { vcshp1 = 0. vcshp2 } ) NIC NIC_Public1 ( Device = lan0 ) Appendix B.

Oracle Configuration With Shared Server Support

Oracle Configuration With Shared Server Support
The following example describes a typical service group configured to monitor Oracle with shared server support.

Netlsnr

LSNR_oraprod_lsnr ORA_oraprod
Oracle

IP_oraprod
IP

Mount_oraprod_u01
Mount Mount

Mount_oraprod_u02 Vol_oraprod_vol1
Volume Volume

Vol_oraprod_vol2
NIC

NIC_oraprod
DiskGroup

DG_oraprod

The shared disk groups and volumes in the cluster are configured as resources of type DiskGroup and Volume respectively. The volumes are mounted using the Mount agent. The virtual IP address for the service group is configured using the IP and NIC resource types. The Oracle server can be started after each of these resources is brought online. If your configuration does not use VERITAS Volume Manager, use the DiskReservation resource type to configure shared storage instead of the DiskGroup and Volume resource types. Sample Configuration File
include "types.cf" include "OracleTypes.cf" cluster vcs ( ) system vcshp1 ( )

94

VCS Enterprise Agent for Oracle, Installation and Configuration Guide

Oracle Configuration With Shared Server Support

system vcshp2 ( )

group ORA_PROD_Group ( SystemList = { vcshp1 = 0, vcshp2 = 1 } AutoStartList = { vcshp1 } ) DiskGroup DG_oraprod ( DiskGroup = ora_prod_dg StartVolumes = 0 StopVolumes = 0 ) IP IP_oraprod ( Device = lan0 Address = "10.212.102.13" ) Mount Mount_oraprod_u01 ( MountPoint = "/prod/u01" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u01-vol" FSType = vxfs FsckOpt = "-n" ) Mount Mount_oraprod_u02 ( MountPoint = "/prod/u02" BlockDevice = "/dev/vx/dsk/ora_prod_dg/u02-vol" FSType = vxfs FsckOpt = "-n" ) NIC NIC_ORAPROD ( Device = lan0 ) Netlsnr LSNR_oraprod_lsnr ( Owner = oraprod Home = "/prod/u01/oracle/product/8.1.5" TnsAdmin = "/prod/u01/oracle/network/admin" Listener = LISTENER_PROD MonScript = "./bin/Netlsnr/LsnrTest.pl" ) Oracle ORA_oraprod ( Sid = PROD
Appendix B, Sample Configurations 95

Oracle Configuration With Shared Server Support

Owner = oraprod Home = "/prod/u01/oracle/product/8.1.5" Pfile = "/prod/u01/oracle/admin/pfile/initPROD.ora" EnvFile = "/tmp/env.sh" DetailMonitor = 1 MonScript = "./bin/Oracle/SqlTest.pl" User = thor Pword = hvlTptWvj Table = thor ) Volume Vol_oraprod_vol1 ( Volume = u01-vol DiskGroup = ora_prod_dg ) Volume Vol_oraprod_vol2 ( Volume = u02-vol DiskGroup = ora_prod_dg ) IP_oraprod requires NIC_ORAPROD LSNR_oraprod_lsnr requires IP_oraprod Mount_oraprod_u01 requires Vol_oraprod_vol1 Mount_oraprod_u02 requires Vol_oraprod_vol2 ORA_oraprod requires IP_oraprod ORA_oraprod requires Mount_oraprod_u01 ORA_oraprod requires Mount_oraprod_u02 Vol_oraprod_vol1 requires DG_oraprod Vol_oraprod_vol2 requires DG_oraprod

96

VCS Enterprise Agent for Oracle, Installation and Configuration Guide

ora file. ◆ ◆ ◆ ◆ ◆ 97 . If your configuration has several 8. create UNIX accounts with DBA privileges. Make sure that each listener listens to a different virtual address. For example. So. set up a parallel service group.1. Listeners accompanying different versions of Oracle may not be backward-compatible. even if each instance uses the same Oracle version. Make sure that each Oracle instance has a separate disk group and is configured as a separate service group. Locate the pfiles in the default location and define several listener processes to ensure clean failover.Best Practices for Multiple Oracle Instance Configurations C This appendix lists some Best Practices for VCS using multiple Oracle instances in a VCS environment. create a separate $ORACLE_HOME for each Oracle version. Define the system parameters such that the allocation of semaphore and shared memory is appropriate on all systems. ◆ ◆ ◆ ◆ ◆ For each SID to be configured. Use a dedicated set of binaries for each Oracle instance. you could adapt the standard to make it more application-specific. In cluster configurations. Follow the Optimal Flexible Architecture (OFA) standard (/uxx/<SID>). you must verify that the listener supports the other versions of Oracle in the cluster. install a version on the root disk or preferably on a secondary disk. If your configuration uses the same Oracle version for all instances. You must also create a separate Envfile for each version of Oracle.x instances and just one listener. assign different names to listeners and make sure that they do not listen to the same port. If your configuration has different versions of Oracle. Also. if you want to create a single listener. /app/uxx/<SID>.

For the same instance of a database. ◆ 98 VCS Enterprise Agent for Oracle. The pfiles must be co-ordinated between systems. ensure that the pfiles referenced are identical across the nodes. Installation and Configuration Guide . you must redefine at minimum the $ORACLE_HOME and $ORACLE_SID variables every time you want to invoke svrmgrl.◆ If you create a single user named oracle and define the variables required by Oracle.

ora. which is a binary file stored on the database server. On UNIX platforms.ora ✔ SPFILE.ora Using the default init.Using the SPFILE in an Oracle Cluster D Oracle versions prior to Oracle9i used an initialization file initSID. a text file. you can start an Oracle instance in the following ways: ◆ ◆ ◆ ◆ Using the default SPFILE spfileSID. Oracle reads the initialization parameters from the SPFILE. Oracle9i introduced the SPFILE. Starting an Oracle Instance For versions above Oracle9i.ora file initSID. you had to manually apply them to the initialization file.ora 99 . changes to the instance parameters can be set to be persistent across all startup and shutdown procedures.ora By specifying an SPFILE in the initialization file init. With this feature.ora When you run the startup command without a PFILE clause. to start database instances.ora ✔ initSID. Changes applied to instance parameters during a database session were not saved to the file.ora By specifying an initialization file init. the default location for the SPFILE or PFILE is $ORACLE_HOME/dbs. Oracle locates the initialization parameter file by examining file names in the following order: ✔ SPFILESID.

create the following entry in the PFILE: SPFILE = spfile_location The variable spfile_location represents the complete path of the SPFILE. For example: SPFILE = /database/startup/spfileora1. You can run the following command to create the SPFILE: CREATE SPFILE [= spfile_name] FROM PFILE [= pfile_name ]. preferably at the same location as that of the database control files. If you do not specify the PFILE. the database instance starts up using the default SPFILE. Specifying the SPFILE Location in the PFILE To specify the location of the SPFILE in a PFILE. If you do not specify the complete path for the SPFILE. You must have the sysdba or the sysoper system privileges to create an SPFILE.ora In this case.Using the SPFILE in a VCS Cluster Using the SPFILE in a VCS Cluster When using the Oracle enterprise agent. you can start a database instance by specifying a PFILE. the contents of the PFILE must specify the location of the SPFILE. If your configuration uses the SPFILE. this commands creates an SPFILE at the default location ($ORACLE_HOME/dbs on UNIX). which must be created from the PFILE. Installation and Configuration Guide . Note VERITAS recommends that the SPFILE be located on shared storage. ◆ The agent attribute Pfile must specify the location of the PFILE. 100 VCS Enterprise Agent for Oracle. to start the database use the following command: startup pfile=location_of_pfile Creating the SPFILE from a PFILE The SPFILE must be created from the PFILE.

setting 32 E Editing attributes 55 Encrypting passwords 58 Enterprise agent about 1 configuring using Cluster Manager 53 configuring using command-line 56 configuring using wizard 42 disabling 65 error messages 67 installing 32 modifying configuration 66 removing 66 troubleshooting 67 typical setup 10 upgrading 34 Error messages 67 F Failover 9 H Hot backup 16 I ioscan command 32 M Message log 67 Monitoring options 9 N Netlsnr agent attribute definitions 77 operations 3 resource type 77 101 .Index Symbols $ORACLE_HOME limitation for 15 location 14 on local disk 14 on shared disk 14 A Agent operations Netlsnr agent 3 Oracle agent 2 Attribute definitions Netlsnr agent 77 Oracle agent 74 Attributes editing 55 modifying 55 C CD-ROM. mounting 32 Cluster Manager 53 Commands ioscan 32 nohup 32 swinstall 33 xhost 32 Configuration modifying 66 typical setup 10 Configuration files 79 Configuration wizard 42 cssd daemon 23 disabling 23 D Database tablespaces 15 Detail Monitoring about 59 disabling for Netlsnr 62 disabling for Oracle 62 enabling for Netlsnr 62 enabling for Oracle 62 setting up 59 DISPLAY variable.

hot backup 16 P Passwords.Netlsnr agent attributes AgentDebug 78 Encoding 78 EnvFile 78 Home 77 Listener 77 LsnrPwd 78 MonScript 78 Owner 77 TnsAdmin 77 NLS information. defining 16 nohup command 32 O Offlining service group 64 Onlining service group 63 Operations Netlsnr agent 3 Oracle agent 2 Oracle database tablespaces 15 error handling 6 installing 13 multiple instances 15 shutdown options 5 startup options 4 supported configurations 36 Oracle agent attribute definitions 74 operations 2 resource type 73 Oracle agent attributes AgentDebug 76 AutoEndBkup 75 DetailMonitor 76 Encoding 76 EnvFile 75 Home 74 MonScript 76 Owner 74 Pfile 75 Pword 76 ShutDownOpt 75 Sid 74 StartUpOpt 75 Table 76 User 76 Oracle configuration multiple instances (multiple listeners) 38 multiple instances (single listener) 83 single instance 80 Oracle database. editing 55 Resource type Netlsnr 77 Oracle 73 S Sample configuration files 79 Sample Oracle Configuration 10 Service group bringing online 63 switching 64 taking offline 64 Shutdown options 5 SPFILE creating 100 location of 100 using in VCS 99 Startup options 4 swinstall command 33 Switching service group 64 T Troubleshooting 67 V vcsencrypt utility 58 W Wizard 42 X xhost command 32 102 VCS Enterprise Agent for Oracle. encrypting 58 R Removing agent 63 Resource attributes. Installation and Configuration Guide .