JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for Oracle Guide     Oracle Solaris Cluster
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for Oracle

Overview of the Installation and Configuration Process for HA for Oracle

Planning the HA for Oracle Installation and Configuration

Configuration Requirements

Configuration Planning Questions

Preparing the Nodes and Disks

How to Prepare the Nodes

How to Configure the Oracle Database Access Using Solaris Volume Manager

How to Configure the Oracle Database Access Using Veritas Volume Manager

How to Configure the Oracle Database Access Using Oracle ASM

How to Configure an Oracle Grid Infrastructure for Clusters SCAN Listener

Installing the Oracle ASM Software

Verifying the Oracle ASM Software Installation

Installing the Oracle Database Software

How to Install the Oracle Database Software

How to Set the Oracle Database Kernel Parameters

Verifying the Oracle Database Installation and Configuration

How to Verify the Oracle Database Installation

Creating an Oracle Database

How to Create a Primary Oracle Database

Setting Up Oracle Database Permissions

How to Set Up Oracle Database Permissions

Installing the HA for Oracle Packages

How to Install the HA for Oracle Packages

Registering and Configuring HA for Oracle

Tools for Registering and Configuring HA for Oracle

Setting HA for Oracle Extension Properties

How to Register and Configure HA for Oracle (clsetup)

How to Register and Configure HA for Oracle Without Oracle Grid Infrastructure (CLI)

How to Register and Configure HA for Oracle With Oracle Grid Infrastructure for a Standalone Server (CLI)

How to Register and Configure HA for Oracle With Oracle Grid Infrastructure for a Cluster (CLI)

Verifying the HA for Oracle Installation

How to Verify the HA for Oracle Installation

Oracle Clients

Location of HA for Oracle Log Files

Tuning the HA for Oracle Fault Monitors

Operation of the Oracle Server Fault Monitor

Operation of the Main Fault Monitor

Operation of the Database Client Fault Probe

Operations to Monitor the Partition for Archived Redo Logs

Operations to Determine Whether the Database is Operational

Actions by the Server Fault Monitor in Response to a Database Transaction Failure

Scanning of Logged Alerts by the Server Fault Monitor

Operation of the Oracle Listener Fault Monitor

Obtaining Core Files for Troubleshooting DBMS Timeouts

Customizing the HA for Oracle Server Fault Monitor

Defining Custom Behavior for Errors

Custom Action File Format

Changing the Response to a DBMS Error

Responding to an Error Whose Effects Are Major

Ignoring an Error Whose Effects Are Minor

Changing the Response to Logged Alerts

Changing the Maximum Number of Consecutive Timed-Out Probes

Propagating a Custom Action File to All Nodes in a Cluster

Specifying the Custom Action File That a Server Fault Monitor Should Use

How to Specify the Custom Action File That a Server Fault Monitor Should Use

Upgrading HA for Oracle Resource Types

Upgrading the SUNW.oracle_listener Resource Type

Information for Registering the New Resource Type Version

Information for Migrating Existing Instances of the Resource Type

Upgrading the SUNW.oracle_server Resource Type

Information for Registering the New Resource Type Version

Information for Migrating Existing Instances of the Resource Type

Changing the Role of an Oracle Data Guard Instance

How to Change the Role of an Oracle Data Guard Instance

A.  HA for Oracle Extension Properties

B.  Preset Actions for DBMS Errors and Logged Alerts

C.  Sample Configurations for Oracle ASM with HA for Oracle

Index

Registering and Configuring HA for Oracle

This section describes how to register and configure the HA for Oracle data service, with or without Oracle Grid Infrastructure (Grid Infrastructure) software installed on the same nodes that run Oracle Solaris Cluster software.

This section provides the following information:

Tools for Registering and Configuring HA for Oracle

Oracle Solaris Cluster provides the following tools for registering and configuring HA for Oracle:

The clsetup utility and Oracle Solaris Cluster Manager each provide a wizard for configuring HA for Oracle. The wizards reduce the possibility for configuration errors that might result from command syntax errors or omissions. These wizards also ensure that all required resources are created and that all required dependencies between resources are set.

Setting HA for Oracle Extension Properties

Use the extension properties in Appendix A, HA for Oracle Extension Properties to create your resources. To set an extension property of a resource, include the option -p property=value in the clresource(1CL) command that creates or modifies the resource. Use the procedure in Chapter 2, Administering Data Service Resources, in Oracle Solaris Cluster Data Services Planning and Administration Guide to configure the extension properties if you have already created your resources.

You can update some extension properties dynamically. You can update others, however, only when you create or disable a resource. The Tunable entries indicate when you can update each property. See the r_properties(5) man page for details about all Oracle Solaris Cluster resource properties.

SUNW.oracle_server Extension Properties describes the extension properties that you can set for the Oracle server.

How to Register and Configure HA for Oracle (clsetup)

This procedure provides the long forms of the Oracle Solaris Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical.


Note - The clsetup utility does not support configuration of HA for Oracle with ZFS.


Before You Begin

Ensure that the following prerequisites are met:

Ensure that you have the following information:

  1. Become superuser on any cluster node.
  2. Start the clsetup utility.
    # clsetup

    The clsetup main menu is displayed.

  3. Type the number that corresponds to the option for data services and press Return.

    The Data Services menu is displayed.

  4. Type the number that corresponds to the option for configuring HA for Oracle and press Return.

    The clsetup utility displays the list of prerequisites for performing this task.

  5. Verify that the prerequisites are met, and press Return.

    The clsetup utility displays a list of the cluster nodes.

  6. Select the nodes or zones where you require Oracle Database software to run.
    • To accept the default selection of all listed nodes or zones in an arbitrary order, press Return.
    • To select a subset of the listed nodes or zones, type a comma-separated or space-separated list of the numbers that correspond to the nodes or zones. Then press Return.

      Ensure that the nodes or zones are listed in the order in which the nodes or zones are to appear in the node list of the resource group in which the Oracle Database resource is to be placed. The first node or zone in the list is the primary node or zone of this resource group.

    • To select all nodes or zones in a particular order, type a comma-separated or space-separated ordered list of the numbers that correspond to the nodes or zones and press Return.

      Ensure that the nodes or zones are listed in the order in which the nodes or zones are to appear in the node list of the resource group in which the Oracle resource is to be placed. The first node or zone in the list is the primary node or zone of this resource group.

  7. To confirm your selection of nodes or zones, type d and press Return.

    The clsetup utility displays the types of Oracle Database components that are to be configured.

  8. Type the numbers of the Oracle Database components you want to configure and press Return.

    The clsetup utility lists the Oracle Database home directory.

  9. Specify the Oracle home directory for your installation of the Oracle Database software.
    • If the directory is listed, select the directory as follows:
      1. Type the number that corresponds the directory that you are selecting.

        The clsetup utility displays a list of Oracle Database system identifiers that are configured on the cluster. The utility also prompts you to specify the system identifier for your installation of Oracle.

    • If the directory is not listed, specify the directory explicitly.
      1. Type e and press Return.

        The clsetup utility prompts you for the Oracle home directory.

      2. Type the full path to the Oracle Database home directory and press Return.

        The clsetup utility displays a list of Oracle system identifiers that are configured on the cluster. The utility also prompts you to specify the system identifier for your installation of Oracle Database software.

  10. Specify the Oracle SID of the Oracle database that you are configuring.
    • If the SID is listed, select the SID as follows:
      1. Type the number that corresponds the SID that you are selecting.

        The clsetup utility displays the properties of the Oracle Solaris Cluster resources that the utility will create.

    • If the SID is not listed, specify the SID explicitly.
      1. Type e and press Return.

        The clsetup utility prompts you for the SID.

      2. Type the SID and press Return.

        The clsetup utility displays the properties of the Oracle Solaris Cluster resources that the utility will create.

    The clsetup utility displays the properties of the Oracle Solaris Cluster resources that the utility will create.

  11. If you require a different name for any Oracle Solaris Cluster resources properties, change each name as follows.
    1. Type the number that corresponds to the name that you are changing and press Return.

      The clsetup utility displays a screen where you can specify the new name.

    2. At the New Value prompt, type the new name and press Return.

    The clsetup utility returns you to the list of the properties of the Oracle Solaris Cluster resource that the utility will create.

  12. To confirm your selection of Oracle Solaris Cluster resource properties, type d and press Return.

    The clsetup utility displays a list of existing storage resources. If no storage resources are available, the clsetup utility displays a list of shared storage types where data is to be stored.

  13. Type the numbers that correspond to type of shared storage that you are using for storing the data and press Return.

    The clsetup utility displays the file-system mount points that are configured in the cluster.

  14. Select the file system mount points as follows.
    • To accept the default selection of all listed file-system mount points in an arbitrary order, type a. Then press Return.
    • To select a subset of the listed filea system mount points, type a comma-separated or space-separated list of the numbers that correspond to the file-system mount points. Then press Return.

    The clsetup utility displays the global disk sets and device groups that are configured in the cluster.

  15. Select the device groups as follows.
    • To accept the default selection of all listed device groups in an arbitrary order, type a and press Return.
    • To select a subset of the listed device groups, type a comma-separated or space-separated list of the numbers that correspond to the device groups and press Return.

    The clsetup utility returns to you the list of highly available storage resources.

  16. Type a comma-separated or space-separated list of the numbers that correspond to the storage resources that your data service requires, and press Return.
  17. To confirm your selection of Oracle Solaris Cluster storage resources, type d and press Return.

    The clsetup utility displays all the existing logical hostname resources in the cluster. If there are no logical hostname resources available, the clsetup utility prompts for the logical hostname that the resource is to make highly available.

  18. Specify the logical hostname and press Return.

    The clsetup utility returns to you the list of available logical hostname resources.

  19. Type a comma-separated or space-separated list of the numbers that correspond to the logical hostname resources that your data service requires, and press Return.
  20. To confirm your selection of Oracle Solaris Cluster logical hostname resources, type d and press Return.

    The clsetup utility displays the names of the Oracle Solaris Cluster objects that the utility will create.

  21. If you require a different name for any Oracle Solaris Cluster objects, change each name as follows.
    • Type the number that corresponds to the name that you are changing and press Return.

      The clsetup utility displays a screen where you can specify the new name.

    • At the New Value prompt, type the new name and press Return.

      The clsetup utility returns you to the list of the names of the Oracle Solaris Cluster objects that the utility will create.

  22. To confirm your selection of Oracle Solaris Cluster object names, type d and press Return.
  23. To create the configuration, type c and Press Return.

    The clsetup utility displays a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the clsetup utility displays the commands that the utility ran to create the configuration.

  24. Press Return to continue.
  25. (Optional) Type q and press Return repeatedly until you quit the clsetup utility.

    If you prefer, you can leave the clsetup utility running while you perform other required tasks before using the utility again.

How to Register and Configure HA for Oracle Without Oracle Grid Infrastructure (CLI)

This procedure provides the long forms of the Oracle Solaris Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical.

Before You Begin

Ensure that the following prerequisites are met:

Ensure that you have the following information:

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.
  2. Register the resource types for the data service.

    For HA for Oracle, you register two resource types, SUNW.oracle_server and SUNW.oracle_listener, as follows.


    Note - For Oracle Database version 11g release 2 or 12c, if you are using an Oracle Grid Infrastructure for Clusters Single Client Access Name (SCAN) listener, omit registration of the SUNW.oracle_listener resource type.


    # clresourcetype register SUNW.oracle_server
    # clresourcetype register SUNW.oracle_listener
  3. Create a failover resource group to hold the network and application resources.

    This step is not required if you use the Solaris ZFS, because the resource group was created when the highly available local ZFS was configured in How to Prepare the Nodes. The resources that are created in other steps in this procedure are to be added to this resource group.

    You can optionally select the set of nodes or zones on which the data service can run with the -n option, as follows.

    # clresourcegroup create [-n node-zone-list] resource-group
    -n node-zone-list

    Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node:zone. In this format, node specifies the name or ID of a node and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    The order in this list determines the order in which the nodes or zones are considered primary during failover. This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.

    resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.

  4. Verify that all of the network resources that you use have been added to your name service database.

    You should have performed this verification during the Oracle Solaris Cluster installation.


    Note - Ensure that all of the network resources are present in the server's and client's /etc/inet/hosts file to avoid any failures because of name service lookup.


  5. Add a logical hostname resource to the failover resource group.
    # clreslogicalhostname create -g resource-group [-h logical-hostname] logical-hostname-rs
    logical-hostname

    Specifies a logical hostname. This logical hostname must be present in your name service database. If logical-hostname and logical-hostname-rs are identical, logical-hostname is optional.

    logical-hostname-rs

    Specifies the name that you are assigning to the logical hostname resource that you are creating.

  6. Register the HAStoragePlus resource type with the cluster.
    # clresourcetype register SUNW.HAStoragePlus
  7. Add a resource of type HAStoragePlus to the failover resource group.

    Note - If you use the Solaris ZFS for Oracle Database files, omit this step. The HAStoragePlus resource was created when the highly available local ZFS was configured. For more information, see How to Prepare the Nodes.



    Caution

    Caution - Raw devices from Oracle Solaris Cluster device groups are not supported in non-global zones.



    Note - The HAStoragePlus resource type must be a minimum of version 4 if it is to be supported in non-global zones.


    # clresource create -g resource-group \
    -t SUNW.HAStoragePlus \
    -p GlobalDevicePaths=device-path \
    -p FilesystemMountPoints=mount-point-list \
    -p AffinityOn=TRUE hastp-rs

    You must set either the GlobalDevicePaths extension property or the FilesystemMountPoints extension property:

    • If your database is on a raw device, set the GlobalDevicePaths extension property to the global device path.

    • If your database is on the cluster file system, specify mount points of the cluster file system and the local file system.


    Note - AffinityOn must be set to TRUE and the local file system must reside on global disk groups to be failover.


    The resource is created in the enabled state.

  8. Bring online the failover resource group in a managed state on a cluster node or zone.
    # clresourcegroup online -M resource-group
    -M

    Places the resource group that is brought online in a managed state.

  9. Create Oracle Database application resources in the failover resource group.
    Oracle server resource:
    # clresource create  -g resourcegroup \
    -t SUNW.oracle_server \ 
    -p Alert_log_file=path-to-log \
    -p Connect_string=user/passwd \
    -p ORACLE_SID=instance \
    -p ORACLE_HOME=Oracle_home \
    -p Restart_type=entity-to-restart \
    [-p Dataguard_role=role] \
    [-p Standby_mode=mode] \
    -p Resource_dependencies_offline_restart=storageplus-resource \
    resource
    
    Oracle listener resource:
    # clresource create -g resource-group \
    -t SUNW.oracle_listener \ 
    -p LISTENER_NAME=listener \
    -p ORACLE_HOME=Oracle_home \
    -p Resource_dependencies_offline_restart=storageplus-resource \
    resource
    -g resource-group

    Specifies the name of the resource group into which the resources are to be placed.

    -t

    Specifies the type of the resource to add.

    -p Alert_log_file=path-to-log

    Sets the path under $ORACLE_HOME for the server message log.

    -p Connect_string=user/passwd

    Specifies the user and password that the fault monitor uses to connect to the database. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Oracle Solaris authorization, type a slash (/) instead of the user name and password.

    -p ORACLE_SID=instance

    Sets the Oracle Database system identifier.

    -p LISTENER_NAME=listener

    Sets the name of the Oracle Database listener instance. This name must match the corresponding entry in listener.ora.

    -p ORACLE_HOME=Oracle_home

    Sets the path to the Oracle Database home directory.

    -p Restart_type=entity-to-restart

    Specifies the entity that the server fault monitor restarts when the response to a fault is restart. Set entity-to-restart as follows:

    • To specify that only this resource is restarted, set entity-to-restart to RESOURCE_RESTART. By default, only this resource is restarted.

    • To specify that all resources in the resource group that contains this resource are restarted, set entity-to-restart to RESOURCE_GROUP_RESTART.

      If you set entity-to-restart to RESOURCE_GROUP_RESTART, all other resources (such as Apache or DNS) in the resource group are restarted, even if they are not faulty. Therefore, include in the resource group only the resources that you require to be restarted when the Oracle Database server resource is restarted.

    -p Dataguard_role=role

    Specifies the role of the database instance. Change role as follows:

    • To create a resource for a primary database instance that does not have standby instances configured, change role to NONE. This value is the default value.

    • To create a resource for a primary database instance that has standby database instances configured, change role to PRIMARY.

    • To create a resource for a standby database instance, change role to STANDBY.

    -p Standby_mode=mode

    Specifies the mode for the standby database instance. If you change Dataguard_role to NONE or PRIMARY, the value of the Standby_mode is ignored.

    • To specify a logical standby database, change mode to LOGICAL. This value is the default value.

    • To specify a physical standby database, change mode to PHYSICAL.

    • Beginning with Oracle Database 11g, to specify a snapshot standby database, change mode to SNAPSHOT.

    resource

    Specifies the name of the resource that you are creating.


    Note - Optionally, you can set additional extension properties that belong to the Oracle Database data service to override their default values. See Setting HA for Oracle Extension Properties for a list of extension properties.


    The resources are created in the enabled state.

Example 1-1 Registering HA for Oracle to Run in the Global Zone

The following example shows how to register HA for Oracle 11g release 1 on a two-node cluster.

Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical Hostname: schost-1
Resource group: resource-group-1 (failover resource group)
HAStoragePlus Resource: hastp-rs
Oracle Database Resources: oracle-server-1, oracle-listener-1
Oracle Database Instances: ora-lsnr (listener), ora-srvr (server)
 
Create the failover resource group to contain all of the resources
# clresourcegroup create resource-group-1
 
Add the logical hostname resource to the resource group
# clreslogicalhostname create -g resource-group-1 schost-1 
 
Register the SUNW.HAStoragePlus resource type
# clresourcetype register SUNW.HAStoragePlus

Add a resource of type SUNW.HAStoragePlus to the resource group
# clresource create -g resource-group-1 \
-t SUNW.HAStoragePlus \
-p FileSystemMountPoints=/global/oracle,/global/ora-data/logs,local/ora-data \
-p AffinityOn=TRUE \
hastp-rs

Bring the resource group online in a managed state
# clresourcegroup online -M resource-group-1

Register the Oracle Database resource types
# clresourcetype register SUNW.oracle_server
# clresourcetype register SUNW.oracle_listener
 
Add the Oracle Database application resources to the resource group
# clresource create -g resource-group-1 \
-t SUNW.oracle_server \
-p Alert_log_file=/global/oracle/message-log \
-p Connect_string=scott/tiger \
-p ORACLE_HOME=/global/oracle \
-p ORACLE_SID=ora-srvr \
-p Dataguard_role=STANDBY \
-p Standby_mode=PHYSICAL \
-p Resource_dependencies_offline_restart=hastp-rs \
oracle-server-1
 
# clresource create -g resource-group-1 \
-t SUNW.oracle_listener \
-p ORACLE_HOME=/global/oracle \
-p LISTENER_NAME=ora-lsnr \
oracle-listener-1

Example 1-2 Registering HA for Oracle to Run in the Non-Global Zone

The following example shows how to register HA for Oracle 11g release 1 on a two-node cluster. The non-global zone root is located on a local file system and the zone is not configured with the HA for Solaris Containers data service.

Cluster Information
Node names: phys-schost-1, phys-schost-2
Non-global zone names: sc1zone1, sc2zone1
Logical Hostname: schost-1
Resource group: resource-group-1 (failover resource group)
HAStoragePlus Resource: hastp-rs
Oracle Database Resources: oracle-server-1, oracle-listener-1
Oracle Database Instances: ora-lsnr (listener), ora-srvr (server)

 
Create the failover resource group to contain all of the resources
# clresourcegroup create phys-schost-1:sc1zone1,phys-schost-2:sc2zone1 \
resource-group-1
 
Add the logical hostname resource to the resource group
# clreslogicalhostname create -g resource-group-1 \
schost-1 
 
Register the SUNW.HAStoragePlus resource type.
# clresourcetype register SUNW.HAStoragePlus

Add a resource of type SUNW.HAStoragePlus to the resource group.
# clresource create -g resource-group-1 -t SUNW.HAStoragePlus \
-p FileSystemMountPoints=/global/oracle,/global/ora-data/logs,local/ora-data \
-p AffinityOn=TRUE \
hastp-rs

Bring the resource group online in a managed state
# clresourcegroup online -M resource-group-1

Register the Oracle resource types.
# clresourcetype register SUNW.oracle_server
# clresourcetype register SUNW.oracle_listener
 
Add the Oracle Database application resources to the resource group
# clresource create -g resource-group-1 \
-t SUNW.oracle_server \ 
-p ORACLE_HOME=/global/oracle \
-p Alert_log_file=/global/oracle/message-log \
-p ORACLE_SID=ora-srvr \ 
-p Connect_string=scott/tiger \
-p Dataguard_role=STANDBY \ 
-p Standby_mode=PHYSICAL \
oracle-server-1
 
# clresource create -g resource-group-1 \
-t SUNW.oracle_listener -p ORACLE_HOME=/global/oracle \
-p LISTENER_NAME=ora-lsnr \
oracle-listener-1

Example 1-3 Registering HA for Oracle to Run in a Zone Cluster

The following example shows how to register HA for Oracle 11g release 1 in a zone cluster.

Cluster Information
Node names: phys-schost-1, phys-schost-2
zone cluster names: zonecluster1, zonecluster2
Logical Hostname: zchost-1
Resource group: resource-group-1 (failover resource group)
HAStoragePlus Resource: hastp-rs
Oracle Database Resources: oracle-server-1, oracle-listener-1
Oracle Database Instances: ora-lsnr (listener), ora-srvr (server)
 
Create the failover resource group to contain all of the resources
# clresourcegroup create -Z zonecluster1 resource-group-1
 
Add the logical hostname resource to the resource group
# clreslogicalhostname create -Z zonecluster1 -g resource-group-1 zchost-1 
 
Register the SUNW.HAStoragePlus resource type.
# clresourcetype register -Z zonecluster1 SUNW.HAStoragePlus

Add a resource of type SUNW.HAStoragePlus to the resource group.
# clresource create -Z zonecluster1 \
-g resource-group-1 \
-t SUNW.HAStoragePlus \
-p FileSystemMountPoints=/global/oracle,/global/ora-data/logs,local/ora-data \
-p AffinityOn=TRUE \
hastp-rs

Bring the resource group online in a managed state
# clresourcegroup online -Z zonecluster1 -M resource-group-1

Register the Oracle Database resource types
# clresourcetype register -Z zonecluster1 SUNW.oracle_server
# clresourcetype register -Z zonecluster1 SUNW.oracle_listener
 
Add the Oracle Database application resources to the resource group
# clresource create -Z zonecluster1 \
-g resource-group-1 \
-t SUNW.oracle_server \ 
-p Alert_log_file=/global/oracle/message-log \
-p Connect_string=scott/tiger \
-p ORACLE_HOME=/global/oracle \
-p ORACLE_SID=ora-srvr \ 
-p Dataguard_role=STANDBY \ 
-p Standby_mode=PHYSICAL \
oracle-server-1
 
# clresource create -Z zonecluster1 \
-g resource-group-1 \
-t SUNW.oracle_listener \ 
-p ORACLE_HOME=/global/oracle \
-p LISTENER_NAME=ora-lsnr \
oracle-listener-1

How to Register and Configure HA for Oracle With Oracle Grid Infrastructure for a Standalone Server (CLI)


Note - Single instance Oracle ASM is not supported with Oracle 11g release 2 or 12c. For these releases, you must only use clustered Oracle ASM.


This procedure explains the steps to register and configure single instance Oracle ASM using Oracle Solaris Cluster maintenance commands. The Oracle_Home for Oracle ASM is on a local file system only.


Note - Oracle ASM disk group and Oracle database can be configured in different resource groups. If the Oracle ASM disk group and Oracle database are configured in different resource groups, you should set a strong positive affinity (+++) between the Oracle ASM disk group resource group and Oracle database resource group.


Before You Begin

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.
  2. Register the Oracle ASM resource types for the data service.
    1. Register the scalable ASM instance resource type.
      # clresourcetype register SUNW.scalable_asm_instance
    2. Register the ASM disk-group resource type.
      # clresourcetype register SUNW.asm_diskgroup
    3. Register the HAStoragePlus resource type.
      # clresourcetype register SUNW.HAStoragePlus
  3. Create a scalable resource group asm-inst-rg for the Oracle ASM instance.
    # clresourcegroup create -S asm-inst-rg
    -S asm-inst-rg

    Specifies the name of the scalable resource group for the Oracle ASM instance.

  4. Add a resource of type SUNW.scalable_asm_instance to the asm-inst-rg resource group.
    # clresource create -g asm-inst-rg \
    -t SUNW.scalable_asm_instance \
    -p ORACLE_HOME=Oracle_home \
    -d asm-inst-rs
    -g asm-inst-rg

    Specifies the name of the resource group for the Oracle ASM instance.

    -p ORACLE_HOME=Oracle_home

    Sets the path to the Oracle ASM home directory.


    Note - You must use only a local file system for the Oracle ASM home directory.


    -d asm-inst-rs

    Specifies the name of the Oracle ASM instance resource that you are creating.

  5. Bring online the scalable resource group in a managed state on a cluster node.
    # clresourcegroup online -eM asm-inst-rg
  6. Create an Oracle ASM resource group asm-dg–rg.
    # clresourcegroup create asm-dg-rg
  7. Add a logical hostname resource to the asm-dg-rg resource group.
    # clreslogicalhostname create -g asm-dg-rg [-h logical-hostname] \
    logical-hostname-rs
    -h logical-hostname

    Specifies a logical hostname. This logical hostname must be present in your name service database. If logical-hostname and logical-hostname-rs are identical, logical-hostname is optional.

    logical-hostname-rs

    Specifies the name that you are assigning to the logical hostname resource that you are creating.

  8. Set a strong positive affinity on the Oracle ASM disk group by the resource group asm-dg-rg.
    # clresourcegroup set -p rg_affinities=++asm-inst-rg asm-dg-rg
  9. If the Oracle ASM disk group uses a Solaris Volume Manager disk set or a VxVM disk group, add a resource of type SUNW.HAStoragePlus to the Oracle ASM disk-group resource group.
    # clresource create -g asm-dg-rg -t SUNW.HAStoragePlus \
    -p globaldevicepaths=path1,path2 hasp-asm-rs
  10. Add a resource of type SUNW.asm_diskgroup to the asm-dg-rg resource group.
    # clresource create -g asm-dg-rg -t SUNW.asm_diskgroup \
    -p asm_diskgroups=dg[,dg…] \
    -p Resource_dependencies_offline_restart=asm-inst-rs,asm-stor-rs \
    -p Resource_dependencies_offline_restart=hasp-asm-rs \
    -d asm-dg-rs
    -t SUNW.asm_diskgroup

    Specifies the type of the resource to add.

    -p asm_diskgroups=dg

    Specifies the ASM disk group.

    asm-stor-rs

    Specifies the name of the Oracle ASM storage resource.

    hasp-asm-rs

    Specifies the name of the HAStoragePlus resource.

    -d asm-dg-rs

    Specifies the name of the resource that you are creating.

  11. Bring online the Oracle ASM disk resource group in a managed state.
    # clresourcegroup online -eM asm-dg-rg
  12. Verify the Oracle ASM installation by issuing the status command.
    # clresource status +
  13. Register the resource types for the HA for Oracle data service.

    For HA for Oracle, you register the resource types SUNW.oracle_server and SUNW.oracle_listener as follows.

    # clresourcetype register SUNW.oracle_server
    # clresourcetype register SUNW.oracle_listener
  14. Create Oracle Database application resources in the failover resource group.
    • Oracle server resource:

      # clresource create -g asm-dg-rg \
      -t SUNW.oracle_server \ 
      -p Connect_string=user/passwd \
      -p ORACLE_SID=instance \
      -p ORACLE_HOME=Oracle_home \
      -p Alert_log_file=path-to-log \
      -p Restart_type=entity-to-restart \
      -p Resource_dependencies_offline_restart=asm-dg-rs \
      -d  ora-db-rs
    • Oracle Database listener resource:

      # clresource create -g asm-dg-rg \
      -t SUNW.oracle_listener \ 
      -p LISTENER_NAME=listener \
      -p ORACLE_HOME=Oracle_home \
      -p resource_dependencies_offline_restart=asm-dg-rs \
      -d ora-lsr-rs
    -g asm-dg-rg

    Specifies the name of the Oracle ASM disk resource group into which the resources are to be placed.

    -t

    Specifies the type of the resource to add, SUNW.oracle_server or SUNW.oracle_listener.

    -p Alert_log_file=path-to-log

    Sets the path under $ORACLE_HOME for the server message log.

    -p Connect_string=user/passwd

    Specifies the user and password that the fault monitor uses to connect to the database. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Solaris authorization, type a slash (/) instead of the user name and password.

    -p ORACLE_SID=instance

    Sets the Oracle system identifier.

    -p LISTENER_NAME=listener

    Sets the name of the Oracle Database listener instance. This name must match the corresponding entry in listener.ora.

    -p ORACLE_HOME=Oracle_home

    Sets the path to the Oracle Database home directory.


    Note - Optionally, you can set additional extension properties that belong to the Oracle Database data service to override their default values. See Setting HA for Oracle Extension Properties for a list of extension properties.


  15. Bring online the Oracle Database server resource.
    # clresource enable ora-db-rs 

How to Register and Configure HA for Oracle With Oracle Grid Infrastructure for a Cluster (CLI)

This procedure explains the steps to register and configure HA for Oracle with clustered Oracle ASM instance using Oracle Solaris Cluster maintenance commands.

For Oracle Database 11g release 2 and 12c only, you can optionally use a third-party volume manager to provide candidate disks to clustered Oracle ASM disk groups. For this type of configuration, this procedure manually creates an Oracle Grid Infrastructure (Grid Infrastructure) resource that proxies the Oracle Solaris Cluster SUNW.ScalDeviceGroup resource. In this procedure, the Grid Infrastructure resource is named sun.resource. You configure sun.resource to ensure that the corresponding Oracle ASM disk group is not mounted until sun.resource is online. The sun.resource resource comes online only if the corresponding SUNW.ScalDeviceGroup resource is online. And the SUNW.ScalDeviceGroup resource only comes online if the actual volume-manager disk set or disk group is online.

To ensure that the Oracle ASM disk group benefits from this dependency chain, after you define sun.resource, you modify the appropriate Grid Infrastructure Oracle ASM disk-group resource so that the hard-start dependency includes sun.resource. Modifying the hard-start dependency of the Grid Infrastructure Oracle ASM disk-group resource can only be performed by the SUNW.scalable_asm_diskgroup_proxy resource by using the VALIDATE method. Therefore, you must set an offline-restart dependency between the SUNW.scalable_asm_diskgroup_proxy and SUNW.ScalDeviceGroup resources.

Before You Begin

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.
  2. If you are using a third-party volume manager or NFS as candidate disks for Oracle ASM disk groups, configure Grid Infrastructure.

    Oracle ASM candidate disks can be derived from any of the following:

    • Solaris Volume Manager disk sets

    • Veritas Volume Manager disk groups

    • NFS

    1. Create the Grid Infrastructure sun.storage_proxy.type resource type.
      # /Grid_home/bin/crsctl add type sun.storage_proxy.type -basetype cluster_resource
    2. Create a Grid Infrastructure sun.resource resource of type sun.storage_proxy.type.

      Note - Ensure that all attribute values are enclosed in single quotes ('). Otherwise, the VALIDATE method of the SUNW.scalable_asm_diskgroup_proxy resource will fail the validation.


      # /Grid_home/bin/crsctl add res sun.scal-asmdg1-rs -type sun.storage_proxy.type \
            -attr "ACTION_SCRIPT='/opt/SUNWscor/dsconfig/bin/scproxy_crs_action' \
            HOSTING_MEMBERS='node1 node2' \
            CARDINALITY='2' \
            PLACEMENT='restricted' \
            ACL='owner:root:rwx,pgrp:oinstall:rwx,other::r--' \
            SCRIPT_TIMEOUT='20' \
            RESTART_ATTEMPTS='60'"
      sun.scal-asmdg1-rs

      The SUNW.ScalDeviceGroup resource name.

      -type sun.storage_proxy.type

      Specifies the sun.storage_proxy.type resource type.

      ACTION_SCRIPT

      Specifies the /opt/SUNWscor/dsconfig/bin/scproxy_crs_action action script.

      HOSTING_MEMBERS

      Specifies the Oracle Solaris Cluster resource group's node list entries that contain the SUNW.ScalDeviceGroup resource.

      CARDINALITY

      Sets the number of hosts that are defined in HOSTING_MEMBERS.

      PLACEMENT

      Set to restricted.

      ACL

      Sets the owner equal to root and the group equal to the ACL group entry for the Oracle ASM disk group. The following command displays the ACL group entry:

      # /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep ACL=
      ACL=owner:oragrid:rwx,pgrp:oinstall:rwx,other::r--

      The example output shows that oinstall is the group entry.

      SCRIPT_TIMEOUT

      Set to 20.

      RESTART_ATTEMPTS

      Set to 60.

    3. Verify that sun.resource is correctly defined.

      Output is similar to the following:

      # /Grid_home/bin/crsctl stat res sun.scal-asmdg1-rs -p
            NAME=sun.scal-asmdg1-rs
            TYPE=sun.storage_proxy.type
            ACL=owner:root:rwx,pgrp:oinstall:rwx,other::r--
            ACTION_FAILURE_TEMPLATE=
            ACTION_SCRIPT=/opt/SUNWscor/dsconfig/bin/scproxy_crs_action
            ACTIVE_PLACEMENT=0
            AGENT_FILENAME=%CRS_HOME%/bin/scriptagent
            AUTO_START=restore
            CARDINALITY=2
            CHECK_INTERVAL=60
            DEFAULT_TEMPLATE=
            DEGREE=1
            DESCRIPTION=
            ENABLED=1
            FAILOVER_DELAY=0
            FAILURE_INTERVAL=0
            FAILURE_THRESHOLD=0
            HOSTING_MEMBERS=node1 node2
            LOAD=1
            LOGGING_LEVEL=1
            NOT_RESTARTING_TEMPLATE=
            OFFLINE_CHECK_INTERVAL=0
            PLACEMENT=restricted
            PROFILE_CHANGE_TEMPLATE=
            RESTART_ATTEMPTS=60
            SCRIPT_TIMEOUT=20
            SERVER_POOLS=
            START_DEPENDENCIES=
            START_TIMEOUT=0
            STATE_CHANGE_TEMPLATE=
            STOP_DEPENDENCIES=
            STOP_TIMEOUT=0
            UPTIME_THRESHOLD=1h
      #
    4. Display the current offline-restart dependency.
      # /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep START_DEPENDENCIES
                  START_DEPENDENCIES=hard(ora.asm) pullup(ora.asm)
      
      # clresource show -p Resource_dependencies_offline_restart asm-data1-rs
      
                  === Resources ===
      
                  Resource: asm-data1-rs
                  Resource_dependencies_offline_restart: asm-inst-rs
      
                  -- Standard and extension properties --
    5. Set the new dependency.
      • If asm-data1-rs already exists, use the following command to set the dependency.

        Note that the command includes the plus (+) symbol:

        # clresource set -p Resource_dependencies_offline_restart+=scal-asmdg1-rs asm-data1-rs
        -p Resource_dependencies_offline_restart+=resource

        (For an Oracle ASM device group only) Sets the offline restart dependency for the specified Oracle ASM storage resource.

        asm-data1–rs

        Specifies the name of the resource that you are modifying.

      • If asm-data1-rs does not yet exist, use the following command to create the resource with the offline-restart dependency:
        # clresource create -g asm-dg-rg \
        -t SUNW.scalable_asm_diskgroup_proxy \
        -p asm_diskgroups=data1 \
        -p Resource_dependencies_offline_restart=asm-inst-rs,scal-asmdg1-rs \
        -d asm-data1-rs
        -g asm-dg-rg

        Specifies the name of the Oracle ASM device group into which the resources are to be placed.

        -t resource-type

        Specifies the type of the resource to add.

        -p asm_diskgroups=data1

        Sets the name of the Oracle ASM disk group.

        -d

        Specifies disabling the resource that you create.

    6. Verify the configured dependency.
      # /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep START_DEPENDENCIES
                  START_DEPENDENCIES=hard(ora.asm,sun.scal-asmdg1-rs) pullup(ora.asm)
      # clresource show -p Resource_dependencies_offline_restart asm-data1-rs
                  === Resources ===
                   
                  Resource: asm-data1-rs
                  Resource_dependencies_offline_restart: asm-inst-rs scal-asmdg1-rs
                   
                  -- Standard and extension properties --
  3. Register the resource type for Oracle Clusterware framework.

    Note - You can alternatively use the clsetup utility to perform Step 3 through Step 5 in this procedure.


    # clresourcetype register SUNW.crs_framework
  4. Add a resource of type SUNW.crs_framework to the rac-fmwk-rg resource group.
    # clresource create -g rac-fmwk-rg -t SUNW.crs_framework \
    -p Resource_dependencies=rac-fmwk-rs \
    -d crs-fmwk-rs
  5. Create a failover resource group ora-db-rg for the Oracle database.
    # clresourcegroup create ora-db-rg
  6. SPARC: If you are using SPARC, perform the following steps. Otherwise go to Step 7.

    Note - You can perform this step only if you have installed the ORCLudlm package before performing the Oracle ASM software installation.


    1. Register the resource type for Oracle UDLM.
      # clresourcetype register SUNW.rac_udlm
    2. Add a resource of type SUNW.rac_udlm to the rac-fmwk-rg resource group.
      # clresource create -g rac-fmwk-rg -t SUNW.rac_udlm \
      -p Resource_dependencies=rac-fmwk-rs rac-udlm-rs
      -g asm-inst-rg

      Specifies the name of the resource group into which the resource is to be placed.

  7. Register the Oracle ASM resource types for the data service.
    1. Register the scalable ASM instance proxy resource type.
      # clresourcetype register SUNW.scalable_asm_instance_proxy
    2. Register the appropriate Oracle ASM disk-group resource type.
      • For Oracle Database 10g and 11g release 1 only, use the SUNW.asm_diskgroup resource type.
        # clresourcetype register SUNW.asm_diskgroup
      • For Oracle Database 11g release 2 and 12c only, use the SUNW.scalable_asm_diskgroup_proxy resource type.
        # clresourcetype register SUNW.scalable_asm_diskgroup_proxy
  8. Create resource groups asm-inst-rg and asm-dg-rg.
    # clresourcegroup create -S asm-inst-rg asm-dg-rg
  9. Set a strong positive affinity on rac-fmwk-rg by asm-inst-rg.
    # clresourcegroup set -p rg_affinities=++rac-fmwk-rg asm-inst-rg
  10. Set a strong positive affinity on asm-inst-rg by asm-dg-rg.
    # clresourcegroup set -p rg_affinities=++asm-inst-rg asm-dg-rg
  11. Add a resource of type SUNW.crs_framework to the rac-fmwk-rg resource group.
    # clresource create -g rac-fmwk-rg -t SUNW.crs_framework \
    -p Resource_dependencies=rac-fmwk-rs \
    -d crs-fmwk-rs
  12. If you installed Oracle_Home for Oracle ASM on a cluster file system, configure resources to use the cluster file system.

    Add resources of type SUNW.HAStoragePlus and SUNW.scalable_asm_instance to the asm-inst-rg resource group and set the appropriate dependencies between the two resources.

    # clresource create -g asm-inst-rg -t SUNW.HAStoragePlus \ 
    -p FilesystemMountPoints=cluster-file-system \
    hastp-rs
    
    # clresource create -g asm-inst-rg -t SUNW.scalable_asm_instance_proxy \
    -p ORACLE_HOME=Oracle_home \
    -p CRS_HOME=grid-home
    -p "oracle_sid{node1}"=instance \
    -p "oracle_sid{node2}"=instance \
    -p Resource_dependencies_offline_restart=hastp-rs \
    -p Resource_dependencies_offline_restart=crs-fmwk-rs \
    asm-inst-rs
    -p FilesystemMountPoints=cluster-file-system

    Specifies the name of the cluster file system.

    hastp-rs

    Specifies the name of the SUNW.HAStoragePlus resource to create.

    -p ORACLE_SID=instance

    Sets the Oracle Database system identifier.

    -p ORACLE_HOME=Oracle_home

    Sets the path to the Oracle Database home directory.

    -p CRS_HOME=grid_home

    Sets the path to the Oracle Grid Infrastructure for a Cluster home directory.

  13. Add a resource of type SUNW.scalable_asm_instance_proxy to the asm-inst-rg resource group.
    # clresource create -g asm-inst-rg \
    -t SUNW.scalable_asm_instance_proxy \
    -p ORACLE_HOME=Oracle_home \
    -p CRS_HOME=grid-home \
    -p "oracle_sid{node1}"=instance \
    -p "oracle_sid{node2}"=instance \
    -p Resource_dependencies_offline_restart=crs-fmwk-rs \
    -d asm-inst-rs
  14. Add an ASM disk-group resource to the asm-dg-rg resource group.
    • For Oracle Database 10g and 11g release 1 only, use the SUNW.asm_diskgroup resource type.
      # clresource create -g asm-dg-rg \
      -t SUNW.asm_diskgroup \
      -p asm_diskgroups=dg[,dg…] \
      -p Resource_dependencies_offline_restart=asm-inst-rs,asm-stor-rs \
      -d asm-dg-rs
      -p asm_diskgroups=dg

      Specifies the Oracle ASM disk group.

      asm-stor-rs

      Specifies the name of the Oracle ASM storage resource.

    • For Oracle Database 11g release 2 and 12c only, use the SUNW.scalable_asm_diskgroup_proxy resource type.
      # clresource create -g asm-dg-rg \
      -t SUNW.scalable_asm_diskgroup_proxy \
      -p asm_diskgroups=dg[,dg…] \
      -p Resource_dependencies_offline_restart=asm-inst-rs,asm-stor-rs \
      -d asm-dg-rs
  15. Bring online the asm-inst-rg resource group in a managed state on a cluster node.
    # clresourcegroup online -eM asm-inst-rg
  16. Bring online the asm-dg-rg resource group in a managed state on a cluster node.
    # clresourcegroup online -eM asm-dg-rg
  17. Verify the Oracle ASM installation by issuing the status command.
    # clresource status +
  18. Register the resource types for the HA for Oracle data service.

    You register two resource types, SUNW.oracle_server and SUNW.oracle_listener.


    Note - For Oracle Database version 11g release 2 or 12c, omit registration of the SUNW.oracle_listener resource type if you are using an Oracle Grid Infrastructure for Clusters Single Client Access Name (SCAN) listener.


    # clresourcetype register SUNW.oracle_server
    # clresourcetype register SUNW.oracle_listener
  19. Add a logical hostname resource to the failover resource group for Oracle database.
    # clreslogicalhostname create -g ora-db-rg [-h logical-hostname] logical-hostname-rs
    logical-hostname

    Specifies a logical hostname. This logical hostname must be present in your name service database. If logical-hostname and logical-hostname-rs are identical, logical-hostname is optional.

    logical-hostname-rs

    Specifies the name that you are assigning to the logical hostname resource that you are creating.

  20. Bring online the failover resource group in a managed state on a cluster node.
    # clresourcegroup online -eM ora-db-rg
  21. Create Oracle Database application resources in the failover resource group.

    Note - For Oracle Database version 11g release 2 or 12c, if you are using an Oracle Grid Infrastructure for Clusters Single Client Access Name (SCAN) listener, you omit configuration of the SUNW.oracle_listener resource.


    • For Oracle Database 10g and 11g release 1 only, use the following commands:

      Create the Oracle Database server resource
      # clresource create -g ora-db-rg \
      -t SUNW.oracle_server \ 
      -p Connect_string=user/passwd \
      -p ORACLE_SID=instance \
      -p ORACLE_HOME=Oracle_home \
      -p Alert_log_file=path-to-log \
      -p Resource_dependencies_offline_restart=asm-dg-rs \
      -d ora-db-rs
      
      Create the Oracle Database listener resource
      # clresource create -g ora-db-rg \
      -t SUNW.oracle_listener \
      -p ORACLE_HOME=Oracle_home \
      -p listener_name=listener \
      -p Resource_dependencies_offline_restart=asm-dg-rs \
      -d ora-ls-rs
    • For Oracle Database 11g release 2 and 12c only, use the following command:

      Create the Oracle server resource
      # clresource create -g ora-db-rg \
      -t SUNW.oracle_server \ 
      -p ORACLE_SID=instance \
      -p ORACLE_HOME=Oracle_home \
      -p Db_unique_name=db-unique-name
      -p Resource_dependencies_offline_restart=asm-dg-rs \
      -d ora-db-rs
    -p Alert_log_file=path-to-log

    (For Oracle Database 10g and 11g release 1 only) Sets the path under $ORACLE_HOME for the server message log.

    -p Connect_string=user/passwd

    (For Oracle Database 10g and 11g release 1 only) Specifies the user and password that the fault monitor uses to connect to the database. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Solaris authorization, type a slash (/) instead of the user name and password.

    -p Db_unique_name=db-unique-name

    (For Oracle Database 11g release 2 and 12c only if using the SCAN listener) Sets the Oracle Database unique name.

    -p listener_name=listener

    Sets the name of the Oracle Database listener instance. This name must match the corresponding entry in listener.ora.

    -d resource

    Specifies the name of the resource that you are creating.


    Note - Optionally, you can set additional extension properties that belong to the Oracle Database data service to override their default values. See Setting HA for Oracle Extension Properties for a list of extension properties.


  22. Bring online the Oracle Database server resource.
    # clresource enable ora-db-rs
  23. If configured, bring online the Oracle Database listener resource.
    # clresource enable ora-ls-rs

Next Steps

Go to Verifying the HA for Oracle Installation after you register and configure Solaris Cluster HA for Oracle.