Sun Cluster Data Service for Oracle Guide for Solaris OS

Registering and Configuring Sun Cluster HA for Oracle

Tools for Registering and Configuring Sun Cluster HA for Oracle

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

The clsetup utility and Sun Cluster Manager each provide a wizard for configuring Sun Cluster 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 Sun Cluster HA for Oracle Extension Properties

Use the extension properties in Sun Cluster 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 Sun Cluster Data Services Planning and Administration Guide for Solaris OS 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 Appendix B, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about all Sun Cluster properties.

SUNW.oracle_server Extension Properties describes the extension properties that you can set for the Oracle server. For the Oracle server, you are required to set only the following extension properties:

ProcedureHow to Register and Configure Sun Cluster HA for Oracle by Using the clsetup Utility

This procedure provides the long forms of the Sun Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands, in Sun Cluster 3.1 - 3.2 Hardware Administration Manual for Solaris OS


Note –

The clsetup utility does not support configuration of Sun Cluster 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 configuringSun Cluster 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 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 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 components that are to be configured.

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

    The clsetup utility lists the Oracle home directory.

  9. Specify the Oracle home directory for your installation of the Oracle 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 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 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.

  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 Sun 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 Sun Cluster resources that the utility will create.

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

  11. If you require a different name for any Sun 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 Sun Cluster resource that the utility will create.

  12. To confirm your selection of Sun 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 Sun 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 Sun Cluster logical hostname resources, type d and press Return.

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

  21. If you require a different name for any Sun 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 Sun Cluster objects that the utility will create.

  22. To confirm your selection of Sun 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.

ProcedureHow to Register and Configure Sun Cluster HA for Oracle by Using Sun Cluster Maintenance commands Without Using ASM

This procedure provides the long forms of the Sun Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands, in Sun Cluster 3.1 - 3.2 Hardware Administration Manual for Solaris OS

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 Sun Cluster HA for Oracle, you register two resource types, SUNW.oracle_server and SUNW.oracle_listener, as follows.


    # 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. 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 Sun 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 logicalhostname] \
    logicalhotname-rs
    
    logicalhostname

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

    logicalhostname-rs

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

  6. Register the SUNW.HAStoragePlus resource type with the cluster.


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


    Caution – Caution –

    Raw devices from Sun Cluster device groups are not supported in non-global zones.



    Note –

    The SUNW.HAStoragePlus resource type must be version 4 if it is to be supported in non-global zones.



    Note –

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



    # 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 application resources in the failover resource group.

    • Oracle server resource:


      # clresource create  -g resourcegroup \
      -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 Dataguard_role=role] \
      [-p Standby_mode=mode] \-p resource_dependencies=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=storageplus-resource resource
      
    -g resource-group

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

    -t SUNW.oracle_server/listener

    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 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 listener instance. This name must match the corresponding entry in listener.ora.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle 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 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.

    resource

    Specifies the name of the resource that you are creating.


    Note –

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


    The resources are created in the enabled state.


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

The following example shows how to register Sun Cluster HA for Oracle 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 Resources: oracle-server-1, oracle-listener-1
Oracle 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 resource types.)
# clresourcetype register SUNW.oracle_server
# clresourcetype register SUNW.oracle_listener
 
(Add the Oracle 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 2 Registering Sun Cluster HA for Oracle to Run in the Non-Global Zone

The following example shows how to register Sun Cluster HA for Oracle on a two-node cluster.


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 Resources: oracle-server-1, oracle-listener-1
Oracle 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 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 3 Registering Sun Cluster HA for Oracle to Run in a Zone Cluster

The following example shows how to register Sun Cluster HA for Oracle 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 Resources: oracle-server-1, oracle-listener-1
Oracle 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 resource types.)
# clresourcetype register -Z zonecluster1 SUNW.oracle_server
# clresourcetype register -Z zonecluster1 SUNW.oracle_listener
 
(Add the Oracle application resources to the resource group.)
# clresource create -Z zonecluster1 -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 -Z zonecluster1 -g resource-group-1 \
-t SUNW.oracle_listener -p ORACLE_HOME=/global/oracle \
-p LISTENER_NAME=ora-lsnr oracle-listener-1

ProcedureHow to Register and Configure Sun Cluster HA for Oracle with Single Instance ASM Using Sun Cluster Maintenance Commands

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


Note –

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


  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 ASM resource types for the data service.


    # clresourcetype register SUNW.scalable_asm_instance
    # clresourcetype register SUNW.asm_diskgroup
    
  3. Create a scalable resource group asm-inst-rg for the ASM instance.


    # clresourcegroup create -S asm-inst-rg
    
    -S asm-inst-rg

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

  4. Add a logical hostname resource to the asm-dg-rg resource group.


    # clreslogicalhostname create -g asm-dg-rg [-h logicalhostname] \
    logicalhotname-rs
    
    -h logicalhostname

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

    logicalhostname-rs

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

  5. 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 ASM instance.

    -p ORACLE_HOME=oracle-home

    Sets the path to the Oracle home directory.

    -d asm-inst-rs

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

  6. Bring online the scalable resource group in a managed state on a cluster node.


    # clresourcegroup online -eM asm-inst-rg
    
  7. Create an ASM disk resource group asm-dg–rg.


    # clresourcegroup create asm-dg-rg
    
  8. Set a strong positive affinity on ASM disk group by the resource group asm-dg-rg.


    # clresourcegroup set -p rg_affinities=++asm-inst-rg asm-dg-rg
    
  9. 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 \
    -p resource_dependencies_offline_restart=asm-inst-rs -d asm-dg-rs
    
  10. Bring online the ASM disk resource group in a managed state.


    # clresource online -eM asm-dg-rg
    
  11. Verify the Oracle ASM installation by issuing the status command.


    # clresource status +
    
  12. Register the resource types for the Sun Cluster HA for Oracle data service.

    For Sun Cluster 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
    
  13. Create Oracle 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 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 logicalhostname-rs \
      -d ora-lsr-rs
      
    -g asm-dg-rg

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

    -t SUNW.oracle_server/listener

    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 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 listener instance. This name must match the corresponding entry in listener.ora.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle home directory.


    Note –

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


  14. Bring online the Oracle server resource.


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


    # clresource enable ora-lsr-rs 
    

ProcedureHow to Register and Configure Sun Cluster HA for Oracle with Clustered ASM Instance Using Sun Cluster Maintenance Commands

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


Note –

You should install the Oracle CRS software before performing the steps in this procedure.


  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.


    Note –

    You can also use the clsetup utility to perform the steps 1 to 6 in the procedure.


  2. Register the resource types for Oracle RAC framework and CRS framework.


    # clresourcetype register SUNW.rac_framework
    # clresourcetype register SUNW.crs_framework
    
  3. Create a scalable resource group rac-fmwk-rg.


    # clresourcegroup create -S rac-fmwk-rg
    
  4. Add a resource of type SUNW.rac_framework to the rac-fmwk-rg resource group.


    # clresource create -g rac-fmwk-rg -t SUNW.rac_framework rac-fmwk-rs
    
  5. 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
    
  6. Create a failover resource group ora-db-rg for the Oracle database.


    # clresourcegroup create ora-db-rg
    
  7. SPARC: If you are using SPARC, perform the following steps. Other wise go to Step 8.


    Note –

    You can perform this step only if you have installed the ORCLudlm package before performing the 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
      
  8. Register the appropriate resource type for the file system you are using and create a resource group.


    Note –

    You should decide the file system you are going to use for Oracle_Home and set up the file system before performing this step. For information on how to setup a file system, see Preparing the Nodes and Disks.


    If you are using a QFS shared file system, perform the following steps to register the QFS shared file system resource type and create the resource groups. Otherwise, you should use the SUNW.HAStoragePlus resource type.

    • If you are using QFS shared file system, perform the following steps to register the QFS shared file system resource type and create the resource groups. Otherwise, you should use the SUNW.HAStoragePlus resource type.

      1. Register the resource type for QFS shared file system.


        # clresourcetype register SUNW.qfs
        
      2. Create a resource group qfs-rg.


        # clresourcegroup create qfs-rg
        
      3. Add a resource of type SUNW.qfs to the qfs-rg resource group.


        # clresource create -g qfs-rg -t SUNW.qfs -p QFSFileSystem=qfs-mp qfs-rs
        
        -g qfs-rg

        Specifies the name of the resource group.

        -t SUNW.qfs

        Specifies the type of the resource to add.

        -p QFSFileSystem=qfs-mp

        Specifies the QFS shared file system mount point.

        qfs-rs

        Specifies the name of the QFS shared file system resource that you are creating.

      4. Bring online the qfs-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM qfs-rg
        
      5. Register the resource type for SUNW.ScalMountPoint.


        # clresourcetype register SUNW.ScalMountPoint
        
      6. Create a scalable resource group scal-mp-rg.


        # clresourcegroup create -S scal-mp-rg
        
      7. Add a resource of type SUNW.ScalMountPoint to the scal-mp-rg resource group.


        # clresource create -g scal-mp-rg -t SUNW.ScalMountPoint \
        -p mountpointdir=mount-point \
        -p filesystemtype=s-qfs \
        -p targetfilesystem=qfs-name \
        -p resource_dependencies=qfs-rs \
        -d scal-mp-rs
        
        -g scal-mp-rg

        Specifies the name of the scalable resource group.

        -t SUNW.ScalMountPoint

        Specifies the type of the resource to add.

        -p mountpointdir=mount-point

        Specifies the directory to which the file system is mounted.

        -p filesystemtype=s-qfs

        Specifies the file system type you are using.

        -p targetfilesystem=qfs-name

        Specifies the file system name that is mounted on this mount point.

        -d scal-mp-rs

        Specifies the name of the scalable mount point resource that you are creating.

      8. Bring online the scal-mp-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM scal-mp-rg
        
    • If you are using file systems other than QFS shared file system, perform the following steps to register the SUNW.HAStoragePlus resource type and create the resource groups.

      1. Register the resource type for SUNW.HAStoragePlus resource type.


        # clresourcetype register SUNW.HAStoragePlus
        
      2. Add a resource of type SUNW.HAStorgePlus to the ora-db-rg resource group.


        # clresource create -g ora-db-rg -t SUNW.HAStoragePlus \
        -p filesystemmountpoints=mount-point-list -d hastp-rs
        
      3. Bring online the ora-db-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM ora-db-rg
        
  9. Register the ASM resource types for the data service.


    # clresourcetype register SUNW.scalable_asm_instance_proxy
    # clresourcetype register SUNW.asm_diskgroup
    
  10. Create resource groups asm-inst-rg and asm-dg-rg.


    # clresourcegroup create -S asm-inst-rg asm-dg-rg
    
  11. Set a strong positive affinity on rac-fmwk-rg by asm-inst-rg.


    # clresourcegroup set -p rg_affinities=++rac-fmwk-rg asm-inst-rg
    
  12. Set a strong positive affinity on asm-inst-rg by asm-dg-rg.


    # clresourcegroup set -p rg_affinities=++asm-inst-rg asm-dg-rg
    
  13. 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
    
  14. 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.asm_instance_proxy \
    -p ORACLE_HOME=oracle-home \
    -p crs_home=crs-home \
    -p "oracle_sid{node1}"=instance \
    -p "oracle_sid{node2}"=instance \
    -p resource_dependencies_offline_restart=crs-fmwk-rs,qfs-mp-rs \
    -d asm-inst-rs
    
    -g asm-inst-rg

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

    -t SUNW.asm_inst_proxy

    Specifies the type of the resource to add.

    -p ORACLE_SID=instance

    Sets the Oracle system identifier.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle home directory.

    -d asm-inst-rs

    Specifies the name of the resource that you are creating.

  15. 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 \
    -p resource_dependencies_offline_restart=asm-inst-rs,qfs-mp-rs \
    -d asm-dg-rs
    
    -g asm-dg-rg

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

    -t SUNW.asm_diskgroup

    Specifies the type of the resource to add.

    -p asm_diskgroups=dg

    Specifies the ASM disk group.

    -d asm-dg-rs

    Specifies the name of the resource that you are creating.

  16. Bring online the asm-inst-rg resource group in a managed state on a cluster node.


    # clresourcegroup online -eM asm-inst-rg
    
  17. Bring online the asm-dg-rg resource group in a managed state on a cluster node.


    # clresourcegroup online -eM asm-dg-rg
    
  18. Verify the Oracle ASM installation by issuing the status command.


    # clresource status +
    
  19. Register the resource types for the Sun Cluster HA for Oracle data service.

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


    # clresourcetype register SUNW.oracle_server
    # clresourcetype register SUNW.oracle_listener
    
  20. Add a logical hostname resource to the failover resource group for Oracle database.


    # clreslogicalhostname create -g ora-db-rg [-h logicalhostname] \
    logicalhostname-rs
    
    logicalhostname

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

    logicalhostname-rs

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

  21. Bring online the failover resource group in a managed state on a cluster node.


    # clresourcegroup online -eM ora-db-rg
    
  22. Create Oracle application resources in the failover resource group.

    • Oracle 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
      
    • Oracle 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,logicalhostname-rs \
      -d ora-ls-rs
      
    -g ora-db-rg

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

    -t SUNW.oracle_server/listener

    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 Solaris authorization, type a slash (/) instead of the user name and password.

    -p ORACLE_SID=instance

    Sets the Oracle system identifier.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle home directory.

    -p listener_name=listener

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

    -d ora-ls-rs

    Specifies the name of the resource that you are creating.


    Note –

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


  23. Bring online the Oracle server resource.


    # clresource enable ora-db-rs
    
  24. Bring online the Oracle listener resource.


    # clresource enable ora-ls-rs
    
Cluster File System

Note –

You can also install Oracle_Home for ASM on a cluster file system. If you are using a cluster file system, you should create the resources SUNW.HAStoragePlus and SUNW.scalable_asm_instance and set the appropriate dependencies between these two resources.

Sample commands to create the SUNW.HAStoragePlus resource and SUNW.scalable_asm_instance resource is given as follows:


# 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 \
-p ORACLE_HOME=oracle-home \
-p "oracle_sid{node1}"=instance \
-p "oracle_sid{node2}"=instance \
-p resource_dependencies_restart=hastp-rs \
-p resource_dependencies_offline_restart=crs-fmwk-rs \
asm-inst-rs

Where to Go From Here

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