vcs 41 oracle9

Upload: pippo-primo

Post on 10-Apr-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Vcs 41 Oracle9

    1/112

    N12191G

    June 2005

    VERITAS Cluster ServerEnterprise Agent 4.1

    for Oracle

    Installation and Configuration Guide

    HP-UX

  • 8/8/2019 Vcs 41 Oracle9

    2/112

    ii VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    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 SoftwareCorporation shall not be liable for errors contained herein or for incidental or consequential damagesin 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 theU.S. and other countries. Other names may be trademarks of their respective owners.

    VERITAS Software Corporation350 Ellis StreetMountain View, CA 94043USAPhone 6505278000 Fax 6505272908www.veritas.com

    http://www.veritas.com/http://www.veritas.com/
  • 8/8/2019 Vcs 41 Oracle9

    3/112

    iii

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Handling 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

  • 8/8/2019 Vcs 41 Oracle9

    4/112

    iv VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Chapter 2. Installing and Configuring Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    Points to Note Before Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    Location of the $ORACLE_HOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    Multiple Oracle Instances (SIDs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Location of Database Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Transparent Listener Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Long Pathname Limitation for $ORACLE_HOME . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Defining NLS Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    Hot Backup of Oracle Database and VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    Overview of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    Installing Oracle Binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Configuring the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    Copying the $ORACLE_BASE/admin/SID Directory . . . . . . . . . . . . . . . . . . . . . . . 29

    Starting the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    Setting MLOCK Privilege for DBA User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    Chapter 3. Installing the Oracle Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    Installing the Agent Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    Upgrading the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Chapter 4. Configuring the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    Oracle Configurations in VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    Single Oracle Instance Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    Multiple Oracle Instance (Single Listener) Configuration . . . . . . . . . . . . . . . . . . . . 37

    Multiple Oracle Instances (Multiple Listeners) Configuration . . . . . . . . . . . . . . . . . 38

    Configuration With Shared Server Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

  • 8/8/2019 Vcs 41 Oracle9

    5/112

    Contents v

    Configuring the Agent Using the Agent Configuration Wizard . . . . . . . . . . . . . . . . . . 42

    Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    Configuring the Agent Using Cluster Manager (Java Console) . . . . . . . . . . . . . . . . . . .53

    Creating a New Service Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    Editing Resource attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Configuring the Agent Using the Command-line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

    Encrypting Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    Additional Considerations with Basic Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    Setting Up Detail Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    Setting Up Detail Monitoring for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    Enabling and Disabling Detail Monitoring for Oracle . . . . . . . . . . . . . . . . . . . . . . . . 62

    Setting Up Detail Monitoring for Netlsnr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    Chapter 5. Administering the Oracle Service Group . . . . . . . . . . . . . . . . . . . . . . . . .63

    Bringing the Service Group Online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

    Switching the Service Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    Taking the Service Group Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64

    Disabling the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    Modifying the Agent Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    Removing the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    Chapter 6. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67

    Error Messages Common to the Oracle and Netlsnr Agents . . . . . . . . . . . . . . . . . . . . . 67

    Error Messages Specific to the Oracle Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    Error Messages Specific to the Netlsnr Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

  • 8/8/2019 Vcs 41 Oracle9

    6/112

    vi VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Appendix A. Resource Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    Oracle Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    Netlsnr Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    Appendix B. Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    Single Oracle Instance Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Multiple Oracle Instances (Single Listener) Configuration . . . . . . . . . . . . . . . . . . . . . . 83

    Multiple Instance (Multiple Listeners) Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    Oracle Configuration With Shared Server Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    Appendix C. Best Practices for Multiple Oracle Instance Configurations . . . . . . . 97

    Appendix D. Using the SPFILE in an Oracle Cluster . . . . . . . . . . . . . . . . . . . . . . . . 99

    Starting an Oracle Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

    Using the SPFILE in a VCS Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    Specifying the SPFILE Location in the PFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    Creating the SPFILE from a PFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

  • 8/8/2019 Vcs 41 Oracle9

    7/112

    vii

    Preface

    This book describes how to install and configure the VERITAS Cluster Server (VCS)Enterprise Agent 4.1 for Oracle.

    If this document is dated more than six months prior to the date you are installing yourenterprise agent, contact VERITAS Technical Support to confirm you have the latestsupported versions of the application and operating system.

    How This Guide is OrganizedChapter 1. Introduction on page 1presents a brief introduction of the VCS enterpriseagent for Oracle.

    Chapter 2. Installing and Configuring Oracle on page 13describes how to install andconfigure Oracle in a VCS cluster.

    Chapter 3. Installing the Oracle Agent on page 31 describes how to install VCSenterprise agent for Oracle in a VCS cluster.

    Chapter 4. Configuring the Agent on page 35 describes how to configure an Oracleservice group in a VCS cluster.

    Chapter 5. Administering the Oracle Service Group on page 63 describes theadministrative tasks you can perform on an Oracle service group.

    Chapter 6. Troubleshooting on page 67 lists the error messages associated with the VCSenterprise agent for Oracle. If applicable, a recommended solution is also provided.

    Appendix A. Resource Type Definitions on page 73 lists the resource type definitionsand attribute definitions for the VCS enterprise agent for Oracle.

    Appendix B. Sample Configurations on page 79 provides sample configurations for theOracle service group.

    Appendix C. Best Practices for Multiple Oracle Instance Configurations on page 97 listssome best practices for using the VCS enterprise agent for Oracle.

    Appendix D. Using the SPFILE in an Oracle Cluster on page 99 describes how to usethe SPFILE in an Oracle cluster.

  • 8/8/2019 Vcs 41 Oracle9

    8/112

    Conventions

    viii VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Conventions

    Convention Usage Example

    monospace Used for path names,commands, output, directoryand file names, functions, andparameters.

    Read tunables from the/etc/vx/tunefstab file.

    See the ls(1) manual page for moreinformation.

    monospace(bold)

    Indicates user input. # ls pubs

    italic Identifies book titles, newterms, emphasized text, andvariables replaced with aname or value.

    See the Users Guide for details.

    The variable system_name indicates thesystem on which to enter the command.

    bold Depicts GUI objects, such asfields, list boxes, menuselections, etc. Also depictsGUI commands.

    Enter your password in the Passwordfield.

    Press Return.

    blue text Indicates hypertext links. See Getting Help on page ix.

    # Unix superuser prompt (allshells).

    # cp /pubs/4.1/user_book/release_mgnt/4.1/archive

  • 8/8/2019 Vcs 41 Oracle9

    9/112

    Chapter ,

    Getting Help

    ix

    Getting Help

    For technical assistance, visit http://support.veritas.com and select phone or emailsupport. This site also provides access to resources such as TechNotes, product alerts,software downloads, hardware compatibility lists, and the VERITAS customer emailnotification service. Use the Knowledge Base Search feature to access additional productinformation, including current and past releases of product documentation.

    Diagnostic tools are also available to assist in troubleshooting problems associated withthe product. These tools are available on disc or can be downloaded from the VERITASFTP site. See the README.VRTSspt file in the /support directory for details.

    For license information, software updates and sales contacts, visithttps://my.veritas.com/productcenter/ContactVeritas.jsp. For information onpurchasing product documentation, visit http://webstore.veritas.com.

    Documentation Feedback

    Your feedback on product documentation is important to us. Send suggestions forimprovements and reports on errors or omissions to [email protected] title and part number of the document (located in the lower left corner of the titlepage), and chapter and section titles of the text on which you are reporting. Our goal is toensure customer satisfaction by providing effective, quality documentation. For assistancewith topics other than documentation, visit http://support.veritas.com.

    http://support.veritas.com/https://my.veritas.com/productcenter/ContactVeritas.jsphttp://webstore.veritas.com/mailto:[email protected]://support.veritas.com/http://webstore.veritas.com/http://support.veritas.com/http://support.veritas.com/mailto:[email protected]://my.veritas.com/productcenter/ContactVeritas.jsp
  • 8/8/2019 Vcs 41 Oracle9

    10/112

    Documentation Feedback

    x VCS Enterprise Agent for Oracle, Installation and Configuration Guide

  • 8/8/2019 Vcs 41 Oracle9

    11/112

    1

    Introduction 1VCS enterprise agents monitor specific resources within an enterprise application,determine the status of these resources, and start or stop them according to externalevents. The VCS enterprise agent for Oracle provides high availability for Oracle in a VCScluster.

    About the VCS Enterprise Agent for Oracle

    The VCS enterprise agent for Oracle monitors the Oracle and listener processes, bringsthem online, and takes them offline.

    The package contains two VCS agents:

    The Oracle agent, which monitors the Oracle database processes.

    The Netlsnr agent, which monitors the listener process.

    The agents include VCS type declarations and agent executables, and are represented

    with the Oracle and Netlsnr resource types, respectively. Both agents work together tomake Oracle highly available in a VCS cluster.

  • 8/8/2019 Vcs 41 Oracle9

    12/112

    About the VCS Enterprise Agent for Oracle

    2 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Oracle Agent

    The Oracle agent monitors the database processes. Specific agent operations include:

    OnlineStarts the Oracle database by using the following svrmgrl or sqlpluscommand:

    startup pfile=$PFile force

    You can also configure the agent to start the database using different Startup optionsfor Oracle. See Startup Options on page 4 for more information about these options.

    OfflineStops the Oracle database with the specified options by using the followingsvrmgrl or sqlplus command:

    shutdown immediate

    You can also configure the agent to stop the database using different Shutdownoptions for Oracle. See Shutdown Options on page 5 for more information aboutthese options.

    MonitorThe Oracle agent provides two levels of monitoring: basic and detail. In the

    basic monitoring mode, the agent scans the process table for the ora_dbw, ora_smon,ora_pmon, and ora_lgwr processes to verify Oracle is running. In the detailmonitoring mode, the agent performs a transaction on a test table in the database toensure that Oracle is functioning properly.

    CleanForcibly stops the Oracle database by using the following svrmgrl orsqlplus command:

    shutdown abort

    If the process does not respond to the shutdown command, the agent scans theprocess table for processes associated with the configured instance and kills them.

    InfoProvides static and dynamic information about the state of the database. SeeInfo Entry Point on page 7 for more information.

    ActionPerforms predefined actions on a resource. See Action Entry Point onpage 8 for more information.

  • 8/8/2019 Vcs 41 Oracle9

    13/112

    Chapter 1, Introduction

    About the VCS Enterprise Agent for Oracle

    3

    Netlsnr Agent

    The Netlsnr agent monitors the listener process. The agent controls the listener for thedatabase. The listener is a server process that listens to incoming client connectionrequests and manages traffic to the database.

    The Netlsnr agent brings the listener services online, monitors their status, and takes themoffline. Specific agent operations include:

    OnlineStarts the listener process by using the following command:

    lsnrctl start $LISTENER

    OfflineStops the listener process by using the followingcommand:

    lsnrctl stop $LISTENER

    If the listener is configured with a password, the agent uses the password to stop thelistener.

    MonitorThe Netlsnr agent provides two levels of monitoring: basic and detail. In thebasic monitoring mode, the agent scans the process table for the tnslsnr process to

    verify the listener process is running. In the detail monitoring mode, the agent usesthe command lsnrctl status $LISTENER to verify the status of the Listenerprocess.

    CleanScans the process table for tnslsnr $Listener and kills it.

    ActionPerforms predefined actions on a resource. See Action Entry Point onpage 8 for more information.

  • 8/8/2019 Vcs 41 Oracle9

    14/112

    Additional Information About the Agent

    4 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Additional Information About the Agent

    Startup and Shutdown Options

    You can specify Startup and Shutdown options for configured Oracle instances.

    Startup Options

    The agent supports the following startup options:

    Startup Option Description

    STARTUP

    (Default)

    Runs startup pfile='location_of_pfileforce if the pfile isconfigured.

    If the pfile is not configured, the agent runs startupforce. It picks

    up the default parameter files from their default locations.

    RESTRICTED Starts the database in the RESTRICTED mode.

    RECOVERDB Performs a database recovery on instance startup.

    CUSTOM Uses a predefined SQL script (start_custom_$SID.sql) and runscustom startup options. The script must be in the$VCS_HOME/bin/Oracle directory and must have access to the

    Oracle Owner OS user. If the file is not present, the agent logs an errormessage.

    With a custom script, the agent takes the following action:

    sqlplus /nolog SRVCTLSTART Uses the srvctl utility to start an instance of the database. Use thisoption for RAC clusters for Oracle9i R2 and later.

  • 8/8/2019 Vcs 41 Oracle9

    15/112

    Chapter 1, Introduction

    Additional Information About the Agent

    5

    Shutdown Options

    The agent supports the following shutdown options:

    Shutdown Option Description

    IMMEDIATE

    (Default)

    Shuts down the Oracle instance by running shutdown immediate.

    SRVCTLSTOP Sets up srvctl as the client tool and uses srvctl syntax to shutdown the instance. This option is valid only for RAC instances inversions 9.2.0 and above.

    TRANSACTIONAL Runs the shutdown transactional command. This option is validonly for databases that support this option.

    CUSTOM Uses a predefined SQL script (shut_custom_$SID.sql) and runscustom shutdown options. The script must be in the

    $VCS_HOME/bin/Oracle directory and must have access to theOracle Owner OS user. If the file is not present, the agent shuts theagent down with the default option.

    SRVCTLSTOP Uses the srvctl utility to stop an instance of the database. Use thisoption for RAC clusters for Oracle9i R2 and later.

  • 8/8/2019 Vcs 41 Oracle9

    16/112

    Additional Information About the Agent

    6 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Handling Oracle Error Codes During Detail Monitoring

    The VCS enterprise agent for Oracle comes with enhanced handling of Oracle errorsduring detail monitoring. The agent classifies Oracle errors according to their severity andassociates predefined actions with each error code.

    The agent includes a reference file called oraerror.dat, which lists Oracle errors andthe action to be taken when the error is encountered.

    The file stores information in the following format:

    Oracle_error_string:action_to_be_taken

    For example:

    01035:WARN01034:FAILOVER

    The agent supports the following actions:

    Action Description

    IGNORE Ignores the error.

    UNKNOWN Marks the resource state as UNKNOWN and sends a notification if theNotifier resource is configured. See the VERITAS Cluster Server UsersGuide for more information about VCS notification.

    This action is typically associated with configuration errors or

    program interface errors.

    WARN Marks the resource state as ONLINE and sends a notification if theNotifier resource is configured.

    This action is typically associated with errors due to exceeded quotalimits, session limits/restricted sessions so on.

    FAILOVER

    (Default)

    Marks the resource state as OFFLINE. This faults the service group,which fails over to the next available system.

    This is agents default behavior. If the file oraerror.dat is notavailable, the agent assumes this default behavior for every Oracleerror encountered.

    NOFAILOVER Freezes the service group temporarily and marks the resource state asOFFLINE. The agent also sends a notification if the Notifier resource isconfigured.

    This action is typically associated with errors that are not

    system-specific. For example, if a database does not open from a nodedue to corrupt Oracle files, failing it over to another node will not help.

  • 8/8/2019 Vcs 41 Oracle9

    17/112

    Chapter 1, Introduction

    Additional Information About the Agent

    7

    Handling Attribute of Type Password

    User passwords used for detail monitoring of the Oracle database are no longer

    clear-text. The Oracle agent supports encryption of user passwords. See EncryptingPasswords on page 58 for further information.

    Configuring listener passwords is introduced in the Netlsnr agent. This password isconsidered for querying the status of the listener and stopping the listener. This passwordis also encrypted. See Encrypting Passwords on page 58 for further information.

    Info Entry PointThe VCS enterprise agent for Oracle supports the Info entry point, which provides staticand dynamic information about the state of the database.

    The entry point retrieves the following static information:

    The entry point retrieves the following dynamic information:

    You can add additional attributes by adding sql statements to the file$VCS_HOME/bin/Oracle/resinfo.sql. For example:

    select 'static:HostName:'||host_name from v$instance;

    select 'dynamic:ShutdownPending:'||shutdown_pending from v$instance;

    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.

    Version InstanceNo InstanceName

    DatabaseName HostName StartupTime

    Parallel Thread InstanceRole

    InstanceStatus Logins OpenMode

    LogMode ShutdownPending DatabaseStatus

    TotalDBfileSize FreeDBfileSize Shared Pool Percent free

    Buffer Hits Percent

  • 8/8/2019 Vcs 41 Oracle9

    18/112

    Supported Software

    8 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Action Entry Point

    The VCS enterprise agent for Oracle supports the Action entry point, which enables you

    to perform predefined actions on a resource.

    The agent supports the following actions:

    To perform an action on a resource, type the following command:

    # hares -action [-actionargs ...] [-sys] [-clus ]

    You can also add custom actions for the agent. For further information, refer to theVERITAS Cluster Server Agent Developers Guide.

    Supported Software

    Oracle 8.0.x, Oracle 8.1.x, Oracle9i, and Oracle 10g, including 64-bit versions

    VCS 4.1 on HP-UX

    September 2004 HP-UX 11i version 2.0

    Note Within the cluster, all systems must use the same operating system version andpatch level.

    Action Description

    VRTS_GetInstanceName Retrieves the name of the configured instance. You can use thisoption for the Oracle and the Netlsnr resources.

    VRTS_GetRunningServices Retrieves the list of processes monitored by the agent. You canuse this option for the Oracle and the Netlsnr resources.

    DBRestrict Changes the database session to enable the RESTRICTED mode.

    DBUndoRestrict Changes the database session to disable the RESTRICTED mode.

    DBSuspend Suspends a database. This option is available for Oracle versions8i and above.

    DBResume Resumes a suspended database. This option is available for

    Oracle versions 8i and above.

    DBTbspBackup Backs up a tablespace; actionargs contains name of thetablespace to be backed up.

  • 8/8/2019 Vcs 41 Oracle9

    19/112

    Chapter 1, Introduction

    How the Agent Makes Oracle Highly Available

    9

    How the Agent Makes Oracle Highly Available

    The VCS enterprise agent for Oracle continuously monitors the Oracle and listenerprocesses to verify they are functioning properly. The agent provides two levels ofapplication monitoring:

    Primary or Basic Monitoring

    In the Basic monitoring mode, the agent verifies that the Oracle and listener processesare present in the process table.

    NoteBasic monitoring cannot detect whether processes are in a hung or stoppedstates.

    Secondary or Detail Monitoring

    In the Detail monitoring mode, the agent runs a perl script that executes commandsagainst the database and listener to verify their status.

    The agent detects application failure if the monitoring routine reports that the Oracle or

    listener processes are not functioning properly. When this occurs, the Oracle service groupfails over to another node in the cluster, thus ensuring high availability for the Oracleservices and the database.

  • 8/8/2019 Vcs 41 Oracle9

    20/112

    Typical Oracle Configuration in a VCS Cluster

    10 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Typical Oracle Configuration in a VCS Cluster

    In a typical configuration, VCS is configured in a two-system cluster (System 1 andSystem 2). The data to be used by Oracle is installed on shared storage. The Oracle

    binaries can be installed locally on both nodes or on shared disks. The Oracle enterpriseagent is installed on both systems.

    In the configuration depicted in the illustration below, Oracle binaries and data areinstalled completely on shared disks.

    Public Network

    VCS Private Network

    System 1 System 2

    Shared Disks / Disk Groups

    OracleBinaries &Datafiles

  • 8/8/2019 Vcs 41 Oracle9

    21/112

    Chapter 1, Introduction

    Setting Up an Oracle Cluster

    11

    In the configuration depicted in the illustration below, Oracle binaries are installed locallyon each node and Oracle data is installed on shared disks.

    Setting Up an Oracle Cluster

    Setting up an Oracle cluster in a VCS environment involves the following tasks. Each taskis described in detail in subsequent chapters.

    Public Network

    VCS Private Network

    System 1 System 2

    OracleDatafiles

    OracleBinaries

    OracleBinaries

    Shared Disks / Disk Groups

    Setting up a VCS cluster (described in the VCS Installation Guide)

    Installing and Configuring Oracle on page 13

    Configuring the Agent on page 35

    Installing the Oracle Agent on page 31

  • 8/8/2019 Vcs 41 Oracle9

    22/112

    Setting Up an Oracle Cluster

    12 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

  • 8/8/2019 Vcs 41 Oracle9

    23/112

    13

    Installing and Configuring Oracle 2This chapter describes how to install and configure Oracle and its components in a VCS

    cluster. The chapter also lists the prerequisites for installing Oracle. For more informationon installing Oracle, refer to the Oracle documentation on HP-UX.

    Prerequisites

    Verify that all systems in the cluster have adequate resources to run Oracle and VCS.

    Verify that the network supports the TCP/IP protocol.

    P i N B f I lli O l

  • 8/8/2019 Vcs 41 Oracle9

    24/112

    Points to Note Before Installing Oracle

    14 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Points to Note Before Installing Oracle

    The following sections discuss some important tasks that need to be noted before youinstall Oracle in a VCS cluster on HP-UX.

    Location of the $ORACLE_HOME

    You can install the Oracle home directory ($ORACLE_HOME), which contains the Oraclebinaries and configuration files, locally on each server s disk. Alternatively, you can placethe Oracle home directory on the shared storage. The correct location for Oracle binaries

    depends on your environment. The following points discuss the advantages of eachapproach.

    $ORACLE_HOME Directory on Shared Disks

    When the Oracle Database Server ($ORACLE_HOME) is installed on shared disks, eachcluster system must have the same mount point directory for the shared file system.Placing Oracle binaries on shared storage simplifies setting up a given system in a clusterto run an instance. Each database service group is self-contained. An instance can bemoved to a new server in the cluster that shares the storage.

    For example, in a four-system cluster, it is possible to have three database instances, orservice groups, each at a different version of Oracle. If the Oracle binaries are placed onshared storage, three copies of Oracle, that is, one per version are required on sharedstorage. By contrast, placing the binaries on local storage, would require as many as 12copies of the binaries (three versions on four systems).

    The disadvantage of this approach is that a rolling upgrade of binaries on shared storageis not possible.

    $ORACLE_HOME Directory on the Local Disk

    Installing $ORACLE_HOME on the local disk has the advantage of allowing an upgradeof the Oracle database server running on an offline system while the database server runs

    on another system. The database server can later be switched to the upgraded system(provided the database is compatible), permitting a minimum amount of downtime.

    The disadvantage of this approach is that with a large number of systems, it becomesdifficult to maintain the various Oracle installations.

    P i t t N t B f I t lli O l

  • 8/8/2019 Vcs 41 Oracle9

    25/112

    Chapter 2, Installing and Configuring Oracle

    Points to Note Before Installing Oracle

    15

    Multiple Oracle Instances (SIDs)

    If multiple Oracle instances are defined in a single cluster configuration, the startup

    profile for each instance must be accessible on all systems listed in the service groupsSystemList attribute.

    Location of Database Tablespaces

    If the tablespaces are created using regular (UFS or VxFS) files, the file systems containingthese files must be located on shared disks. Create the same file system mount points on

    each system.

    If you are using raw devices on shared disks for Oracle tablespaces, change the ownershipto Oracle dba user and the permissions, or access mode, to 660 on the raw devices storingthe Oracle data.

    For example, if you are using VERITAS Volume Manager, type:

    #vxedit -g diskgroup_name set group=dbauser=oracle mode=660 volume_name

    Note The user oracle and the group dba must be local and not Network InformationService (NIS and NIS+) users

    Transparent Listener Failover

    To enable Oracle Server clients to reconnect after a system switch without reconfiguring,include at least one IP resource in the service group for the Oracle resource. The hostnamemapping the IP address of this resource must be used for the Host field in the file$TNS_ADMIN/listener.ora.

    If you are using the TCP/IP protocol for Oracle client/server communication, verify thatthe file /etc/services on each system defined in the service groups SystemListattribute contains entries for the service name of the Oracle Net Service.

    Long Pathname Limitation for $ORACLE_HOME

    The HP-UX process table limits process pathnames to 79 characters. The full pathname ofprocesses in $ORACLE_HOME can possibly have 80 characters or more. In this case, you cancreate a soft link to the $ORACLE_HOME directory and use it in place of the long filenamein the Home attribute in themain.cf file. You must create the link on each of the systems

    in the cluster.

    Points to Note Before Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    26/112

    Points to Note Before Installing Oracle

    16 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    1. Create a soft link to the long pathname. For example:

    # ln -s /opt/apps/oracle/home/directory/is/longer/than

    /eighty/characters/oracle /opt/link_to_longpath

    2. In the file /etc/VRTSvcs/conf/config/main.cf, modify the Home and Pfileattributes for both the Oracle resource type and the Netlsnr resource type (refer to theSample Configuration in Sample Configurations on page 79).

    For example:

    Home = "/opt/link_to_longpath"

    Pfile = "/opt/link_to_longpath/dbs/initVRT.ora"

    Defining NLS Information

    You can define NLS information by defining the appropriate parameters in the Oracleparameter file or by defining the appropriate environment variables in the EnvFile.Seethe description of the EnvFile attribute in Resource Type Definitions on page 73.

    Defining parameters in the Oracle parameters file affects NLS settings for the Oracleserver. Defining environment variables affects the NLS input and output of client utilities.

    Hot Backup of Oracle Database and VCS

    If a cluster node fails while running a hot backup of an Oracle database, the failover toanother node can succeed only if the Oracle resource attribute, AutoEndBkup, is set to a

    non-zero value. See Resource Type Definitions on page 73 for more information aboutthe Oracle agent attributes.

    Otherwise, the database in the backup mode on the failover system cannot be opened andVCS cannot online the Oracle resource group.

    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, you must take thedatafiles in the database out of the backup mode and shut down the database so that it can

    be reopened. Refer to the Oracle documentation for instructions on how to change thestate of the database files.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    27/112

    Chapter 2, Installing and Configuring Oracle

    Installing Oracle

    17

    Installing Oracle

    The strategy for installing Oracle into a VCS cluster is aimed at ensuring that installations

    on all cluster systems are uniform.

    You can install Oracle in the following two ways in a VCS environment:

    $ORACLE_HOME on the shared disk. Oracle binaries and data, including thedatafiles, control files, redo log files, archive log files, and the spfile are installed onshared disks.

    $ORACLE_HOME on the disk. Oracle binaries are installed ly on each node and the

    data, including the datafiles, control files, redo log files, archive log files, and thespfile, is installed on shared disks.

    Note When installing Oracle, ensure that the login_id, id_name, group_id, andgroup_name for the Oracle owner is the same on all the nodes. The user oracleand the group dba must be local and not Network Information Service (NIS andNIS+) users

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    28/112

    g

    18 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Overview of Tasks

    This section provides an overview of tasks required to install Oracle in a VCS cluster.

    These tasks are described in detail in following sections.

    $ORACLE_HOME on Shared Disks

    Installing Oracle such that the $ORACLE_HOME is on shared disks involves thefollowing tasks.

    The methodology is to install the Oracle binaries and to create the Oracle database onshared disks during the first installation. Mount the Oracle binaries directory and verifythat the database can be started from all nodes.

    Mounting the Oracle binaries directory

    Starting the Database on page 29

    Repeat steps on everycluster node.

    Creating the database on shared disks(See Configuring the Database on page 24)

    Installing Oracle binaries on shared disks(See Installing Oracle Binaries on page 20)

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    29/112

    Chapter 2, Installing and Configuring Oracle

    g

    19

    $ORACLE_HOME on Local Disks

    Installing Oracle such that the $ORACLE_HOME is on local disks involves the following

    tasks.

    The methodology is to install the Oracle binaries and to create the Oracle database onshared disks during the first installation. This ensures that all Oracle installations areidentical and access the database from the same location on the shared disk.

    Installing Oracle binaries locally on the first system(See Installing Oracle Binaries on page 20)

    Starting the Database on page 29

    Repeat steps on every

    cluster node.

    Copying the $ORACLE_BASE/admin/SID directory to the

    local disks (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)

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    30/112

    20 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Installing Oracle Binaries

    This section describes how to install Oracle9i for VCS. Note that the screens and options

    presented by installers for other Oracle versions may differ.

    1. Insert the Oracle CD.

    2. Set the DISPLAY variable, mount the CD drive, and run the Oracle installer as OracleUser.

    # /mnt/cdrom/runInstaller

    3. Read the Welcome screen and click Next.

    4. If this is the first Oracle installation, the Inventory Location dialog box is displayed.Specify the location of your base directory and click OK.

    If in your installation, the $ORACLE_HOME will be on local disks, specify a location

    on the local disk.If the $ORACLE_HOME will be on shared disks, specify a location on the shared disk.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    31/112

    Chapter 2, Installing and Configuring Oracle 21

    5. On the UNIX Group Name dialog box, enter the name of a UNIX group that will havepermissions to update the Oracle software and click Next.

    6. The Oracle installer displays a message asking you to run the script/tmp/orainstRoot.sh. Run the script and click Continue to return to the Oracleinstaller.

    7. On the File Locations dialog box, enter or select a name and a path for the OracleHome and click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    32/112

    22 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    8. On the Available Products dialog box, select the Oracle9i Database option and clickNext.

    9. On the Installation Types dialog box, select your installation type and click Next.

    10. On the Database Configuration dialog box, select the Software Only option and clickNext.

    11. On the Summary dialog box, review your selections. Click Back to make changes.

    Otherwise click Install.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    33/112

    Chapter 2, Installing and Configuring Oracle 23

    12. Click Next after the installation is complete.

    13. On the End of Installation dialog box, click Exit.

    14. Proceed to the next section to configure the database on shared disks.

    Additional Considerations For Installing Oracle 10g on Shared Disks

    Oracle 10g provides a clustering daemon called Oracle Cluster Synchronization ServiceDaemon (CSSD). If the Oracle binary files are on a shared storage, the init command to

    start the deamon may result in an error. Because a VCS cluster for Oracle does not requirethis daemon, VERITAS recommends you to disable the daemon by performing thefollowing steps:

    Remove the following line from the /etc/inittab file on the system from where youran the Oracle installation wizard:

    h1:23:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 >

  • 8/8/2019 Vcs 41 Oracle9

    34/112

    24 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Configuring the Database

    This section instructs you on how to configure an Oracle9i database on shared disks using

    the Database Configuration Assistant.

    You need to configure the database only once, from the node on which you installedOracle first.

    1. Set the DISPLAY variable and start the Oracle Database Configuration Assistant asOracle User.

    # dbca

    2. Read the Welcome screen, click Next.

    3. On the Operations dialog box, select the Create a database option and click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    35/112

    Chapter 2, Installing and Configuring Oracle 25

    4. On the Database Templates dialog box, select a template to create the database andclick Next.

    5. On the Database Identification dialog box, enter or select a unique name and SID forthe global database and click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    36/112

    26 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    6. On the Database Connection Options dialog box, select the Dedicated Server Modeor the Shared Server Mode and click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    37/112

    Chapter 2, Installing and Configuring Oracle 27

    7. On the Initialization Parameters dialog box, specify the locations of the archive logsand the initialization parameter files.

    a. If you want to enable archive logs for the database, click the Archive tab andselect the Archive Log Mode check box. In the Archive Log Destination(s) list,enter a path on the shared disk. This ensures that the Archive Log will be createdon the shared disk.

    b. Click the File Locations tab.

    c. If installing Oracle locally on all systems, make sure that the initializationparameter file and the trace file directories are on the local disk.

    d. Modify other parameters, if desired.

    e. Click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    38/112

    28 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    8. On the Database Storage dialog box, specify the locations of the Control, Data, andRedo log files.

    a. In the left pane, expand the Storage folder by clicking the + next to it.

    b. Click Controlfile and click the General tab in the right pane.

    c. In the FileDirectory field, enter a path on the shared disk for each control file.

    d. Expand the Datafiles folder by clicking the + next to it.

    e. Select the datafile in the left pane and click the General tab in the right pane. Inthe Name field, enter a path on the shared disk for each datafile.

    f. Expand the Redo Log Groups folder by clicking the + next to it.

    g. Select the Redo Log file in the left pane. In the File Directory field in the right

    pane, enter the path of a directory on the shared disk for each Redo Log file.Specify file sizes for the Redo Log files, if desired.

    h. Click Next.

    Installing Oracle

  • 8/8/2019 Vcs 41 Oracle9

    39/112

    Chapter 2, Installing and Configuring Oracle 29

    9. On the Creation Options dialog box, select the Create Database check box and clickFinish.

    10. On the Summary dialog box, review your selections and click OK.

    Note You need to configure and test if the database is accessible on other nodes. If your$ORACLE_HOME is on shared disks, mount the Oracle binaries on each nodeindividually, and start the database (see Starting the Database on page 29). If your$ORACLE_HOME is on local disks, install Oracle locally on other systems (see

    Installing Oracle Binaries on page 20) and start the database on each system,individually (see Starting the Database on page 29).

    Copying the $ORACLE_BASE/admin/SID Directory

    Follow this instruction on each node in the cluster, only if the $ORACLE_HOME is onlocal disks.

    Copy the directory $ORACLE_BASE/admin/SIDfrom the shared disk to the local disk.The variable SID represents the database instance.

    Refer to Oracles OFA Structure for more information.

    Starting the Database

    Mount the database directory and start the database on each node. You can verify accessto the database by running an SQL query.

    Installing Oracle

    S OC

  • 8/8/2019 Vcs 41 Oracle9

    40/112

    30 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Setting MLOCK Privilege for DBA User

    To prevent ASYNCH_IO errors from occuring during select and update queries on the

    Oracle database, set the MLOCK privilege for the dba user.

    To set MLOCK privilege for DBA user

    1. Give the MLOCK privilege to the dba group:

    # setprivgrp dba MLOCK

    2. Create the /etc/privgroup file and add the line:

    dba MLOCK

    3. Verify the availability of MLOCK privilege for the dba group:

    # /usr/bin/getprivgrp dba

  • 8/8/2019 Vcs 41 Oracle9

    41/112

    31

    Installing the Oracle Agent 3This chapter describes how to install the Oracle agent in a VCS cluster. If you have an

    earlier version of the agent installed, refer to Upgrading the Agent on page 34.

    Installing the Agent Software

    The VCS enterprise agent for Oracle is installed from the CD. You must install the OracleEnterprise Agent on all systems that will host the Oracle service group.

    Prerequisites

    Make sure that VCS is installed in the cluster.

    If a previous version of the agent is installed, uninstall it.

    Install and configure the Oracle Server for HP-UX and the add-on Listener. For moreinformation, see the Oracle documentation.

    Installing the Agent Software

    Installation Instructions

  • 8/8/2019 Vcs 41 Oracle9

    42/112

    32 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Installation Instructions

    To access the VCS enterprise agent software on the disc, you must mount the disc.

    To install the agent

    1. Insert the CD in the CD-ROM drive installed on your local system.

    2. Log in as root.

    3. Set the display permission on your workstation:

    # xhost +myws

    4. Configure the shell environment variable DISPLAY on your workstation. Forexample, if your workstation has the name myws, type:

    For Bourne or Korn shell (sh or ksh):

    # DISPLAY=myws:0.0# export DISPLAY

    For C shell (csh or tcsh):

    # setenv DISPLAY myws:0.0

    Setting the DISPLAY environment variable in this way enables you to use the SD-UXgraphical interface.

    5. Create a mount point directory, /cdrom, if it does not exist. The directory must have

    read/write permissions.

    6. Determine the block device file for the CD-ROM drive. The device file should havethe form /dev/dsk/c#t#d#. Enter:

    # ioscan -fnC disk

    For example, the listing may indicate the CD-ROM drives block device is/dev/dsk/c1t2d0; make a note of the device file as it applies to your system.

    7. Run the following commands to start PFS (Portable File System):

    # nohup pfs_mountd nohup pfsd &

    8. Mount the CD. For example, to mount the CD to the mount point /cdrom, enter:

    # /usr/sbin/pfs_mount -t rrip /dev/dsk/clt2d0 /cdrom

    where /dev/dsk/c1t2d0 is the drives block device file.

    Installing the Agent Software

    9 Type the following commands to install the agent and the service group configuration

  • 8/8/2019 Vcs 41 Oracle9

    43/112

    Chapter 3, Installing the Oracle Agent 33

    9. Type the following commands to install the agent and the service group configurationwizard 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 Oracleservice group.

    Upgrading the Agent

    Upgrading the Agent

  • 8/8/2019 Vcs 41 Oracle9

    44/112

    34 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Upgrading the Agent

    This section describes how to upgrade from the VCS enterprise agent 3.5 for Oracle in a

    VCS cluster.

    1. Save the VCS configuration and stop the VCS engine.

    # haconf -dump -makero# hastop -all -force

    2. Back up the configuration file, main.cf to a location on the cluster node.

    3. Follow step a through step c on all systems on which the Oracle agent was installed.

    a. Remove the Oracle agent.

    # swremove VRTSvcsor

    b. Delete the file /etc/VRTSvcs/conf/config/OracleTypes.cf.

    c. Install the VCS enterprise agent 4.1 for Oracle. See Installing the AgentSoftware on page 31 for instructions.

    4. Copy the file OracleTypes.cf from the directory /etc/VRTSvcs/conf/ to the/etc/VRTSvcs/conf/config directory.

    5. Copy the main.cf from the backed up location to /etc/VRTSvcs/conf/config.

    6. Edit the main.cf located under /etc/VRTSvcs/conf/config.

    Replace all resources of type Sqlnet with resources of type Netlsnr. See ResourceType Definitions on page 73 for information about the attributes in this version of theOracle agent.

    7. Verify the configuration

    # cd /etc/VRTSvcs/conf/config

    # hacf -verify

    8. Start VCS on local node first.

    9. Start VCS on other nodes.

  • 8/8/2019 Vcs 41 Oracle9

    45/112

    35

    Configuring the Agent 4Configuring the Oracle enterprise agent involves creating the Oracle service group, its

    resources, and defining attribute values for the configured resources. VCS providesseveral ways to configure an enterprise agent, including the agent configuration wizard,Cluster Manager (Java Console), and the command-line.

    You must have administrator privileges to create and configure a service group.

    Before configuring the agent, review the supported Oracle configurations, describedunder Oracle Configurations in VCS on page 36. Review the Oracle resource type andthe attribute definitions of the Oracle agents, described in Resource Type Definitions on

    page 73. For sample configuration files of the Oracle service group, see SampleConfigurations on page 79.

    Prerequisites

    Install and configure Oracle identically on all cluster systems. (For more information,see Installing and Configuring Oracle on page 13.)

    Verify that the Oracle agent is installed on all cluster systems. (For more information,see Installing the Oracle Agent on page 31.)

    Make sure the Oracle services are not started on reboot by the init script.

    Oracle Configurations in VCS

    Oracle Configurations in VCS

  • 8/8/2019 Vcs 41 Oracle9

    46/112

    36 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Oracle Configurations in VCS

    You can set up Oracle in different ways in a VCS environment.

    Single Oracle Instance Configuration

    This section describes how to configure a single Oracle instance in a VCS environment forhigh availability. For resource dependency graph and sample configuration of servicegroups involving a single Oracle instance, see Single Oracle Instance Configuration onpage 80.

    To configure an Oracle instance in VCS

    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.oraand 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, locatedat $TNS_ADMIN change the host name for all TCP protocol address databases tothe virtual IP address for the service group.

    In the following example, assuming that the host name for the database is set tooraprod, 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)

    )

    )

    b. Perform additional configuration tasks specific to the listener configuration. Inthe file listener.ora located at $TNS_ADMIN, edit the Host= line in theADDRESS_LIST section and add the name of the high availability address for theservice group, in this case, oraprod.

    LISTENER_PROD =(DESCRIPTION_LIST =

    (DESCRIPTION =(ADDRESS_LIST =

    Oracle Configurations in VCS

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

  • 8/8/2019 Vcs 41 Oracle9

    47/112

    Chapter 4, Configuring the Agent 37

    ))

    3. Create the Oracle service groups using the Agent Configuration wizard, ClusterManager (Java Console,) or the command-line. For information on using the wizard,see Configuring the Agent Using the Agent Configuration Wizard on page 42. Forinformation on using Cluster Manager (Java Console), see Configuring the AgentUsing 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 ina VCS environment for high availability. For resource dependency graph and sampleconfiguration 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 changesrequired in these files, depending on your Oracle configuration.

    a. For clients to connect to the failover instance, in the file tnsnames.ora, locatedat $TNS_ADMIN change the host name for all TCP protocol address databases tothe virtual IP address for the service group.

    In the following example, assuming that the host name for the database is set tooraprod, 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)

    )

    Oracle Configurations in VCS

    b. Perform additional configuration tasks specific to the listener configuration. Inh fil i l d $ di h H li i h

  • 8/8/2019 Vcs 41 Oracle9

    48/112

    38 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    the file listener.ora located at $TNS_ADMIN, edit the Host= line in theADDRESS_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 forinstructions. 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 onpage 63 for instructions.

    Multiple Oracle Instances (Multiple Listeners) ConfigurationThis section describes how to configure multiple Oracle instances with multiple listenersin VCS environment for high availability. For resource dependency graph and sampleconfiguration of a service group involving multiple Oracle instance, see MultipleInstance (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.oraand tnsnames.ora as per VCS requirements. This section describes the changesrequired in these files, depending on your Oracle configuration.

    a. For clients to connect to the failover instance, in the file tnsnames.ora, locatedat $TNS_ADMIN change the host name for all TCP protocol address databases tothe virtual IP address for the service group.

    prod =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1521))

    )(CONNECT_DATA =

    Oracle Configurations in VCS

    (SERVICE_NAME = prod))

  • 8/8/2019 Vcs 41 Oracle9

    49/112

    Chapter 4, Configuring the Agent 39

    ))

    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, ClusterManager (Java Console,) or the command-line. For information on using the wizard,see Configuring the Agent Using the Agent Configuration Wizard on page 42. Forinformation on using Cluster Manager (Java Console), see Configuring the AgentUsing Cluster Manager (Java Console) on page 53.

    4. Bring the Oracle service group online. See Bringing the Service Group Online onpage 63 for instructions.

    Oracle Configurations in VCS

    Configuration With Shared Server Support

  • 8/8/2019 Vcs 41 Oracle9

    50/112

    40 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    This section describes how to configure Oracle instance having shared server support in a

    VCS environment for high availability. For resource dependency graph and sampleconfiguration, see Oracle Configuration With Shared Server Support on page 94.

    To configure Oracle with shared server support

    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.oraand tnsnames.ora as per VCS requirements. This section describes the changesrequired in these files, depending on your Oracle configuration.

    a. For clients to connect to the failover instance, in the file tnsnames.ora, locatedat $TNS_ADMIN change the host name for all TCP protocol address databases tothe 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)))

    b. Perform additional configuration tasks specific to the listener configuration. Inthe file listener.ora located at $TNS_ADMIN, edit the Host= line in theADDRESS_LIST section and add the name of the high availability address for theservice group, in this case, oraprod.

    LISTENER_PROD =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod)(PORT = 1522))

    ))

    Oracle Configurations in VCS

    3. In the initialization parameter file, for the mts_dispatchers (called dispatchers inOracle9i versions and above) parameter set the host name for all TCP protocol

  • 8/8/2019 Vcs 41 Oracle9

    51/112

    Chapter 4, Configuring the Agent 41

    Oracle9i versions and above) parameter, set the host name for all TCP protocoladdress dispatchers to the virtual IP address for the service group.

    In the following example from an Oracle 8i configuration, the host name for thedispatcher is set to oraprod.

    mts_dispatchers ="(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod))(MUL=ON)(TICK=15)(POOL=true)"

    In the following example from an Oracle9i configuration, the host name for thedispatcher is set to oraprod.

    dispatchers ="(ADDRESS = (PROTOCOL = TCP)(HOST = oraprod))(MUL=ON)(TICK=15)(POOL=true)"

    4. In the initialization parameter file, set the LOCAL_LISTENER attribute to a listeneralias, so that the Oracle PMON process registers information with the listener.

    _listener=listener_alias

    This listener alias gets appended by the default domain set in the file sqlnet.ora.

    5. In the file tnsnames.ora, create an entry for the listener alias to resolve the addressinformation. In the address parameter, set the host name to the virtual IP address forthe service group, without the CONNECT_DATA portion of the connect descriptor.

    In the following example, the listener listener_alias uses TCP/IP port 1521 and thevirtual IP address for the service group is oraprod.

    listener_alias=(address = (PROTOCOL = TCP)(HOST = oraprod)(PORT= 1521))

    6. Create the Oracle service groups using the Agent Configuration wizard, ClusterManager (Java Console,) or the command-line. For information on using ClusterManager (Java Console), see Configuring the Agent Using Cluster Manager (Java

    Console) on page 53.

    7. Bring the Oracle service group online. See Bringing the Service Group Online onpage 63 for instructions.

    Configuring the Agent Using the Agent Configuration Wizard

    Configuring the Agent Using the Agent ConfigurationWi d

  • 8/8/2019 Vcs 41 Oracle9

    52/112

    42 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Wizard

    VCS provides an Agent Configuration wizard that guides you through the process ofconfiguring the agent. The wizard creates and modifies Oracle service groups.

    This section describes the steps required to create a new Oracle service group using thewizard. To modify an existing service group, see Modifying the Agent Configuration onpage 66.

    Before configuring the Oracle agent, review the resource type and the attribute definitionsof the Oracle and Netlsnr agents, described in Resource Type Definitions on page 73.For sample configuration files and resource dependency graphs of the Oracle servicegroup, see Sample Configurations on page 79.

    Prerequisites

    Make sure that the Oracle instances and listeners to be configured are running. Alllisteners to be configured must listen to the same virtual IP address.

    Note For the default listener, the configuration wizard requires the listener parameterfile, listener.ora, to reside in $ORACLE_HOME/network/admin. No suchcondition applies for non-default listeners.

    The Oracle files (control, data, redo-log, and archive files) must be on shared disks.

    The IP addresses and host names specified in the files listener.ora and tnsnames.ora

    must be the same.

    If detail monitoring is to be used for a database instance, the table used for detailmonitoring must be set up, with user and password assigned.

    Make sure the Oracle type definition is imported to the VCS engine. See Importingthe OracleTypes.cf File on page 43 for instructions.

    Configuring the Agent Using the Agent Configuration Wizard

    Importing the OracleTypes.cf File

    B f fi i th O l t t i t th l f fil t th

  • 8/8/2019 Vcs 41 Oracle9

    53/112

    Chapter 4, Configuring the Agent 43

    Before configuring the Oracle agent, you must import the OracleTypes.cf file to theVCS engine.

    To import using the Cluster Manager

    1. Start Cluster Manager and log on to the cluster.

    2. From the Cluster Explorers File menu, choose Import Types.

    3. In the Import Types dialog box, select the following file.

    /etc/VRTSvcs/conf/OracleTypes.cf

    4. Click Import.

    5. Save the configuration.

    To import using the command line

    1. Log in to sysa as root.

    2. Ensure that all changes to the existing configuration have been saved and that furtherchanges are prevented while you modifymain.cf:

    # haconf -dump -makero

    3.To ensure that VCS is not running while you edit

    main.cf, issue the followingcommand to stop the VCS engine on all systems and leave the resources available:

    # hastop -all -force

    4. Make a backup copy of themain.cf file:

    # cd /etc/VRTSvcs/conf/config# cp main.cf main.cf.orig

    5. Copy the Oracle types configuration file into place:

    # cp /etc/VRTSvcs/conf/OracleTypes.cf/etc/VRTSvcs/conf/config/OracleTypes.cf

    6. Edit themain.cf file to include the OracleTypes.cf file:

    include "OracleTypes.cf"

  • 8/8/2019 Vcs 41 Oracle9

    54/112

    Configuring the Agent Using the Agent Configuration Wizard

    a. Enter a name for the Oracle service group.

    b I h il bl Cl S b l h hi h fi

  • 8/8/2019 Vcs 41 Oracle9

    55/112

    Chapter 4, Configuring the Agent 45

    b. In the Available Cluster Systems box, select the systems on which to configure

    the service group and click the right-arrow icon to move the systems to the servicegroups system list.

    To remove a system from the service groups system list, select the system in theSystems in Priority Order box and click the button with the left arrow icon.

    c. To change a systems priority in the service groups system list, select the systemin the Systems in Priority Order box and click the buttons with the up and downarrow icons. 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.

    d. Click Next.

    5. On the Instance Selection dialog box, select the Oracle instances to be configuredalong with their listeners. Click Discover Oracle Configuration, if required.

    Click Next.

    Configuring the Agent Using the Agent Configuration Wizard

    6. On the Instance Configuration dialog box, specify information for all selectedinstances.

  • 8/8/2019 Vcs 41 Oracle9

    56/112

    46 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    a. Verify the location of the Oracle Parameter File.

    b. Choose Start and Stop options, if desired.

    c. Select the Configure detail monitoring and Specify Advanced options checkboxes, if desired.

    d. Click Next.

    Configuring the Agent Using the Agent Configuration Wizard

    7. If you chose to monitor the database in detail, the Detail Monitoring dialog box isdisplayed.

  • 8/8/2019 Vcs 41 Oracle9

    57/112

    Chapter 4, Configuring the Agent 47

    a. In the Select column, select the check box corresponding to the database to be

    monitored in detail.

    b. Enter a valid user name for the database.

    c. Enter a valid password for the database user.

    Note Do not encrypt passwords when entering them through the AgentConfiguration Wizard; the wizard takes care of encrypting passwords.

    d. In the Table column, enter the name of a table that will be queried to validate thestatus of the database.

    e. Click Next.

    Configuring the Agent Using the Agent Configuration Wizard

    8. If you chose to specify advanced options, the Oracle Advanced Configuration dialogbox is displayed.

  • 8/8/2019 Vcs 41 Oracle9

    58/112

    48 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    a. Enter the location of the Oracle Envfile and the encoding and select the

    AutoEndBkup check box, if desired.

    b. Click Next.

    9. On the Database Configuration dialog box, verify the mount points required by eachdatabase, specify the Mount and Fsck options, and click Next.

    Configuring the Agent Using the Agent Configuration Wizard

    10. On the Listener Configuration dialog box, configure the listeners for the databases.

  • 8/8/2019 Vcs 41 Oracle9

    59/112

    Chapter 4, Configuring the Agent 49

    a. Verify the virtual IP address and Netmask.

    b. For each system, select a device.

    c. Select the Enable detail monitoring and Specify Advanced options, if desired.

    d. Click Next.

    Configuring the Agent Using the Agent Configuration Wizard

    11. If you chose to specify advanced options for the listeners, the Listener AdvancedConfiguration dialog box is displayed.

  • 8/8/2019 Vcs 41 Oracle9

    60/112

    50 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    For each listener, enter the path of the Envfile and encoding, if desired. Enter a valid

    password for the listener. Click Next.

    Note Do not encrypt passwords when entering them through the AgentConfiguration Wizard; the wizard takes care of encrypting passwords.

    Configuring the Agent Using the Agent Configuration Wizard

    12. On the Service Group Summary dialog, review your configuration.

  • 8/8/2019 Vcs 41 Oracle9

    61/112

    Chapter 4, Configuring the Agent 51

    Click on a resource to view its attributes and their configured values in the Attributesbox.

    a. Change names of resources, if desired; the wizard assigns unique names toresources based on their respective name rules.

    To edit a resource name, select the resource name and click on it, press Enter afterediting each attribute.

    b. Review your configuration and click Finish.

    The wizard starts running commands to create the Oracle service group. Variousmessages indicate the status of these commands.

    Configuring the Agent Using the Agent Configuration Wizard

    13. On the Completing the Oracle Configuration wizard dialog box, select the Bring theservice group online check box to bring the service group online on the local system.

  • 8/8/2019 Vcs 41 Oracle9

    62/112

    52 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    Click Close.

    The Oracle service group is created in your cluster.

  • 8/8/2019 Vcs 41 Oracle9

    63/112

    Configuring the Agent Using Cluster Manager (Java Console)

    5. On the Would you like to use a template to configure the service group? dialog box,click Next.

    6 On the Select a template to configure the service group dialog box select the

  • 8/8/2019 Vcs 41 Oracle9

    64/112

    54 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    6. On the Select a template to configure the service group dialog box, select theOracleGroup template on which to base the service group.

    If applicable, a window opens notifying you that names of some resources within thenew service group are already in use. This window also includes a list of alternativenames. You can select an alternative name, or modify the name. Click Next afterresolving the name clashes.

    7. Click Next to create the service group based on the selected template. A window

    opens indicating that commands are being sent to add the group, its resources, andthe attributes and dependencies specified in the template. A progress indicatordisplays the percentage of the commands fired. The actual commands are displayedat the top of the indicator.

    8. Click Next when prompted that the service group has been successfully created.

    9. A window opens listing the service groups resources and their associated attributes.

    Click Finish to accept the default values and complete the configuration. You canmodify the default values of the resources according to your specific configurationrequirements, as instructed in the following section.

    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.

  • 8/8/2019 Vcs 41 Oracle9

    65/112

    Chapter 4, Configuring the Agent 55

    1. Select the resource from the list on the left pane. Its attributes appear in the right pane.

    2. Select the attribute to be modified.

    3. Click the edit icon in the Edit column.

    4. In the Edit Attribute dialog box, enter the attribute values. To modify the scope of theattribute, click the option buttons for Global or Local.

    5. Click OK.

    6. Repeat the procedure for each resource and its attributes and click Finish. Edit theattributes for all the resources according to your configuration.

    7. Follow the wizard instructions to complete the configuration. Click Finish to quit thewizard.

    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 beused as reference to directly modify your present configuration file When you use this

  • 8/8/2019 Vcs 41 Oracle9

    66/112

    56 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    used as reference to directly modify your present configuration file. When you use thismethod, you must stop and restart VCS to implement the configuration.

    Follow the instructions below to configure the agent using the sample configuration file:

    1. Log in to sysa as root.

    2. Ensure that all changes to the existing configuration have been saved and that furtherchanges are prevented while you modifymain.cf:

    # haconf -dump -makero

    3. To ensure that VCS is not running while you editmain.cf, issue the followingcommand to stop the VCS engine on all systems and leave the resources available:

    # hastop -all -force

    4. Make a backup copy of themain.cf file:

    # cd /etc/VRTSvcs/conf/config# cp main.cf main.cf.orig

    5. Copy the Oracle types configuration file into place:

    # cp /etc/VRTSvcs/conf/OracleTypes.cf/etc/VRTSvcs/conf/config/OracleTypes.cf

    6. Edit themain.cf file. The file /etc/VRTSvcs/conf/sample_oracle/main.cf canbe used for reference:

    a. Add an include line for the OracleTypes.cf file:

    include "OracleTypes.cf"

    b. Create the Oracle and Netlsnr resources. You can refer to the examples shown in

    the file /etc/VRTSvcs/conf/sample_oracle/main.cf.

    c. Edit the default attributes to match the parameters in your configuration. SeeResource Type Definitions on page 73 for more information about the agentattributes.

    d. Assign dependencies to the newly created resources. Refer to the sample file/etc/VRTSvcs/conf/sample_oracle/main.cf. and the sample dependency

    graphs in Sample Configurations on page 79. (See the VERITAS Cluster ServerUsers Guide for more information on assigning dependencies.)

    Configuring the Agent Using the Command-line

    7. Save and close the file.

    8. Verify the syntax of the file /etc/VRTSvcs/conf/config/main.cf:

  • 8/8/2019 Vcs 41 Oracle9

    67/112

    Chapter 4, Configuring the Agent 57

    # cd /etc/VRTSvcs/conf/config/# hacf -verify .

    9. Start the VCS engine:

    # hastart

    10. Verify that all Oracle service group resources are brought online:

    # hagrp -state

    11. Take the service group offline and verify that all resources are stopped:

    # hagrp -offline service_group -sys system_name# hagrp -state

    12. Bring the service group online again and verify that all resources are available:

    # hagrp -online service_group -sys system_name# hagrp -state

    13. Start the VCS engine on sysb:

    # hastart

    14. Switch the Oracle service group to sysb:

    # hagrp -switch service_group -to sysb

    15. Verify that all Oracle service group resources are brought online on sysb:

    # hagrp -state

    16. On all the systems, look at the following log files for any errors or status:

    /var/VRTSvcs/log/engine_A.log

    /var/VRTSvcs/log/Oracle_A.log/var/VRTSvcs/log/Netlsnr_A.log

    Configuring the Agent Using the Command-line

    Encrypting Passwords

    VCS provides a utility to encrypt database user passwords and listener passwords.Encrypt the Pword attribute in the Oracle agent and the LsnrPwd attribute in the Netlsnr

  • 8/8/2019 Vcs 41 Oracle9

    68/112

    58 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    agent before configuring these attributes.

    Oracle provides the option of storing the listener password in the listener.ora file, inboth clear text and encrypted formats. Irrespective of the format in which the password isstored in Oracle, you must encrypt the password using the vcsencrypt utility beforeconfiguring the LsnrPwd attribute. This password, when decrypted should be of the sameformat as stored in the listener.ora file.

    Note You need not encrypt passwords when using the configuration wizard or the VCSCluster Manager (Java Console) to configure attributes.

    1. From the path $VCS_HOME/bin/, run the vcsencrypt utility.

    a. Type the following command:

    #vcsencrypt -agent

    b. The utility prompts you to enter the password twice. Enter the password andpress Return.

    # Enter New Password:# Enter Again:

    2. The utility encrypts the password and displays the encrypted password.

    3. Enter this encrypted password as the value for the attribute.

    Copy the encrypted password for future reference.

    Additional Considerations with Basic Monitoring

    Additional Considerations with Basic Monitoring

    Basic monitoring of Oracle processes is user-specific. As a result, an Oracle instancestarted under the context of another user cannot be detected as online. For example, if an

  • 8/8/2019 Vcs 41 Oracle9

    69/112

    Chapter 4, Configuring the Agent 59

    Oracle instance is started under the user oraVRT and the agent is configured for a useroracle, the agent will not detect the instance started by oraVRT as online.

    This could lead to situations where:

    issuing a command to online a resource on a system might online an already runninginstance on that system (or any other system).

    within a failover service group, when the administrator onlines an Oracle resource on

    a system and if the Oracle instance is online on any other system within a cluster, theinstance would come up. However, the database does not get mounted. In suchcircumstances, this failure is detected only by in-depth monitoring. If in-depthmonitoring is not configured, then such a conflict would go undetected.

    Hence, VERITAS recommends that instances started outside VCS control be configuredwith the correct Owner attribute corresponding to the OS user for that instance.

    Setting Up Detail Monitoring

    The VCS enterprise agent for Oracle provides two levels of application monitoring:primary (basic monitoring) and secondary (detail monitoring). In the basic monitoringmode, the agent monitors the Oracle processes to verify that they are continuously active.

    In the detail monitoring mode, the agent executes the script defined in the attribute

    MonScript of the Oracle and Netlsnr resources. If the script successfully executes, theagent considers the resource available. You can customize the default script according toyour configuration.

    You can use the agents detail monitoring capability to monitor the status of a databaseand listener and increase the confidence in their availability. Before setting up detailmonitoring, you must have the agent running satisfactorily at the basic level ofmonitoring.

    Note Disable detail monitoring before undertaking any database maintenance thatinvolves disabling database access to external users.

    Setting Up Detail Monitoring

    Setting Up Detail Monitoring for Oracle

    Detail monitoring for an Oracle resource verifies whether a database is ready fortransactions by performing an update transaction against a table within the database. The

    d k b h d d d

  • 8/8/2019 Vcs 41 Oracle9

    70/112

    60 VCS Enterprise Agent for Oracle, Installation and Configuration Guide

    update action is taken by the two scripts, SqlTest.pl and SimpleTest.pl, providedwith the VCS enterprise agent for Oracle. The scripts are available under the directory/opt/VRTSvcs/bin/Oracle/. Both scripts update the timestamp to monitor thedatabase.

    The SqlTest.pl script checks whether the database is open before updating thetimestamp. If the database is found to be in restricted mode, quiesced mode, or suspendedmode, the monitor returns success. In such a case, only basic monitoring occurs. The

    SimpleTest.pl script does not perform database checks but only issues updatestatements against the table.

    Before enabling detail monitoring for Oracle, you must create a test table (with atimestamp) in the Oracle database. The detail monitor script, MonScript, must exist andhave execute permission for root. You can use a custom monitor script, or the scriptsprovided with the agent. In the monitor script, the return code 100 indicates failure.Return codes from 101 to 110 indicate success.

    The following example, based on the use of the supplied script, shows how to create andtest a table for use by detail monitoring, and how to enable detail monitoring.

    1. Make the VCS configuration writable:

    haconf -makerw

    2. Freeze the service group to avoid automated actions by VCS caused by an incompletereconfiguration:

    hagrp -freezeservice_group

    3. Log on as an Oracle user.

    su -

    4. Set the environment variables for ORACLE_HOME and ORACLE_SID.

    export ORACLE_HOME=export ORACLE_SID=

    5. Start the svrmgrl or sqlplus utility to set up a database table:

    $ORACLE_HOME/bin/svrmgrl

    or

    $ORACLE_HOME/bin/sqlplus /nolog

    Setting Up Detail Monitoring

    6. As the database administrator, issue the following statements at the svrmgrl orsqlplus prompt to create the test table:

    connect / as sysdba

  • 8/8/2019 Vcs 41 Oracle9

    71/112

    Chapter 4, Configuring the Agent 61

    create user

    identified by default tablespace USERS

    temporary tablespace TEMP

    quota 100K on USERS;

    grant create session to ;

    create table . ( tstamp date );

    insert into . (tstamp) values (SYSDATE);

    7. To test the database table for use, do the following:

    disconnect

    connect /

    update . set ( tstamp ) = SYSDATE;

    select TO_CHAR(tstamp, MON DD, YYYY HH:MI:SS AM)

    from .;

    exit

    8. Detail monitoring for the Oracle resource can be enabled by using the following VCScommands:

    hares -modifyOracleResourceUserUser

    hares -modifyOracleResourcePwordPwordhares -modifyOracleResourceTableTablehares -modify OracleResource MonScript "./bin/Oracle/SqlTest.pl"

    hares -modifyOracleResourceDetailMonitor1haconf -dump -makero

    hagrp -unfreezeservice_group

    Note You can also use Cluster Manager (Java Console) to set these attributes.

    Setting Up Detail Monitoring

    Enabling and Disabling Detail Monitoring for Oracle

    To enable detail monitoring, set the DetailMonitor attribute to 1.

    hares modify OracleResource DetailMonitor 1

  • 8/8/2019 Vcs 41 Oracle9

    72/112

    62 VCS Enterprise Agent for Oracle, I