Sun Cluster Data Service for Oracle RAC Guide for Solaris OS

ProcedureHow to Register and Configure Sun Cluster Resources in a Global Cluster for Interoperation With Oracle 9i

The SUNW.scalable_rac_server resource type represents the Oracle RAC server in a Sun Cluster configuration.

Oracle RAC server instances should be started only after the RAC framework is enabled on a cluster node. You ensure that this requirement is met by creating the following affinities and dependencies:

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 Data Services Planning and Administration Guide for Solaris OS.

Perform this procedure on only one node of the cluster.

  1. Become superuser or assume a role that provides solaris.cluster.admin and solaris.cluster.modify RBAC authorizations.

  2. Create the logical hostname resources to represent the IP addresses on which the Oracle listeners are to listen.

    Each node where Sun Cluster Support for Oracle RAC can run requires a logical hostname resource. Create each logical hostname resource as follows:

    1. Create a failover resource group to contain the logical hostname resource.

      Set the properties of the resource group as follows:

      • Specify the node for which you are creating the logical hostname resource as the primary node.

      • Specify the remaining nodes where Sun Cluster Support for Oracle RAC can run as potential primary nodes.

      • Choose an order for the potential primary nodes that ensures that the logical hostname resources are distributed equally throughout the cluster.

      • Ensure that the resource group is failed back to the primary node when the database instance on the primary node recovers after a failure.


      # clresourcegroup create -n nodelist -p failback=true \
      [-p rg_description="description" \]
      lh-name-rg
      
      -n nodelist

      Specifies a comma-separated list of names of the nodes that can master this resource group. Ensure that the node for which you are creating the logical hostname resource appears first in the list. Choose an order for the remaining nodes that ensures that the logical hostname resources are distributed equally throughout the cluster.

      -p rg_description="description"

      Specifies an optional brief description of the resource group. This description is displayed when you use Sun Cluster maintenance commands to obtain information about the resource group.

      lh-name-rg

      Specifies your choice of name to assign to the resource group.

    2. Add a logical hostname resource to the resource group that you created in Step a.


      # clreslogicalhostname create -h lh-name -g lh-name-rg lh-name-rs
      
      -h lh-name

      Specifies the logical hostname that this resource is to make available. An entry for this logical hostname must exist in the name service database.

      -glh-name-rg

      Specifies that you are adding the resource to the resource group that you created in Step 2.

      lh-name-rs

      Specifies your choice of name to assign to the logical hostname resource.

  3. Create a scalable resource group to contain the Oracle RAC server resource and Oracle listener resource.


    # clresourcegroup create -n nodelist \
    -p maximum_primaries=num-in-list \
    -p desired_primaries=num-in-list \
    -p rg_affinities=++rac-fmwk-rg \
    [-p rg_description="description" \]
    -p rg_mode=Scalable rac-db-rg
    
    -n nodelist

    Specifies a comma-separated list of cluster nodes on which Sun Cluster Support for Oracle RAC is to be enabled. The Sun Cluster Support for Oracle RAC software packages must be installed on each node in this list.

    -p maximum_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle RAC is to be enabled. This number must equal the number of nodes in nodelist.

    -p desired_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle RAC is to be enabled. This number must equal the number of nodes in nodelist.

    -p rg_affinities=++rac-fmwk-rg

    Creates a strong positive affinity to the RAC framework resource group. If the RAC framework resource group was created by using the clsetup utility, the RAC framework resource group is named rac-framework-rg.

    -p rg_description="description"

    Specifies an optional brief description of the resource group. This description is displayed when you use Sun Cluster maintenance commands to obtain information about the resource group.

    -p rg_mode=Scalable

    Specifies that the resource group is scalable.

    rac-db-rg

    Specifies the name that you are assigning to the resource group.

  4. Register the SUNW.scalable_rac_listener resource type.


    # clresourcetype register SUNW.scalable_rac_listener
    
  5. Add an instance of the SUNW.scalable_rac_listener resource type to the resource group that you created in Step 3.

    When you create this resource, specify the following information about the resource:

    • The name of the Oracle listener on each node where Oracle RAC is to run. This name must match the corresponding entry in the listener.ora file for the node.

    • The Oracle home directory. The Oracle home directory contains the binary files, log files, and parameter files for the Oracle software.


    # clresource create -g rac-db-rg \
    -t SUNW.scalable_rac_listener \
    -p resource_dependencies_weak=lh-rs-list \
    [-p resource_dependencies=db-bin-rs  \]
    -p listener_name{node}=listener[…] \
    -p oracle_home=ora-home \
    rac-lsnr-rs
    
    -g rac-db-rg

    Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 3.

    [-p resource_dependencies=db-bin-rs]

    Specifies that this Oracle listener resource has a strong dependency on the storage resource for binary files. Specify this dependency only if you are using the Sun StorageTek QFS shared file system or a qualified NAS device for Oracle binary files. The storage resource for Oracle binary files is created when you perform the tasks in Registering and Configuring Storage Resources for Oracle Files.

    -p listener_name{node}=ora-sid

    Specifies the name of the Oracle listener instance on node node. This name must match the corresponding entry in the listener.ora file.

    -p resource_dependencies_weak=lh-rs-list

    Specifies a comma-separated list of resources on which this resource is to have a weak dependency. The list must contain all the logical hostname resources that you created in Step 2.

    -p oracle_home=ora-home

    Specifies the path to the Oracle home directory. The Oracle home directory contains the binary files, log files, and parameter files for the Oracle software.

    rac-lsnr-rs

    Specifies the name that you are assigning to the SUNW.scalable_rac_listener resource.

  6. Register the SUNW.scalable_rac_server resource type.


    # clresourcetype register SUNW.scalable_rac_server
    
  7. Add an instance of the SUNW.scalable_rac_server resource type to the resource group that you created in Step 3.

    When you create this resource, specify the following information about the resource:

    • The Oracle home directory. The Oracle home directory contains the binary files, log files, and parameter files for the Oracle software.

    • The Oracle system identifier on each node where Oracle RAC is to run. This identifier is the name of the Oracle database instance on the node.

    • The full path to the alert log file on each node where Oracle RAC is to run.


    # clresource create -g rac-db-rg \
    -t SUNW.scalable_rac_server \
    -p resource_dependencies=rac-fmwk-rs \
    -p resource_dependencies_offline_restart=[db-storage-rs][,db-bin-rs] \
    -p resource_dependencies_weak=rac-lsnr-rs \
    -p oracle_home=ora-home \
    -p connect_string=string \
    -p oracle_sid{node}=ora-sid[…] \
    -p alert_log_file{node}=al-file[…] \
    rac-srvr-rs
    
    -g rac-db-rg

    Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 3.

    -p resource_dependencies=rac-fmwk-rs

    Specifies the resources on which this Oracle RAC server resource has a strong dependency.

    You must specify the RAC framework resource. If the RAC framework resource group is created by using the clsetup utility or Sun Cluster Manager, this resource is named rac-framework-rs.

    If you are using a volume manager or the Sun StorageTek QFS shared file system for database files, you must also specify the storage resource for database files.

    If you are using the Sun StorageTek QFS shared file system for Oracle binary files, you must also specify the storage resource for binary files.

    The storage resources for Oracle files are created when you perform the tasks in Registering and Configuring Storage Resources for Oracle Files.

    -p resource_dependencies_weak=rac-lsnr-rs

    Specifies a weak dependency by this Oracle RAC server resource on the Oracle listener resource that you created in Step 5.

    -p oracle_sid{node}=ora-sid

    Specifies the Oracle system identifier on node node. This identifier is the name of the Oracle database instance on the node. You must set a different value for this property on each node where Oracle RAC is to run.

    -p oracle_home=ora-home

    Specifies the path to the Oracle home directory. The Oracle home directory contains the binary files, log files, and parameter files for the Oracle software.

    -p connect_string=string

    Specifies the Oracle database user ID and password that the fault monitor uses to connect to the Oracle database. string is specified as follows:

    userid/password
    
    userid

    Specifies the Oracle database user ID that the fault monitor uses to connect to the Oracle database.

    password

    Specifies the password that is set for the Oracle database user userid.

    The database user ID and password are defined during the setup of Oracle RAC. To use Solaris authentication, type a slash (/) instead of a user ID and password.

    rac-srvr-rs

    Specifies the name that you are assigning to the SUNW.scalable_rac_server resource.

  8. Bring online the resource group that you created in Step 3.


    # clresourcegroup online -emM rac-db-rg
    
    rac-db-rg

    Specifies that a resource group that you created in Step 3 is to be moved to the MANAGED state and brought online.


Example D–1 Registering and Configuring Sun Cluster Resources for Interoperation With Oracle 9i

This example shows the sequence of operations that is required to register and configure Sun Cluster resources for interoperation with Oracle 9i on a two-node cluster.

The example makes the following assumptions:

  1. To create the logical hostname resource for node phys-schost-1, the following commands are run:


    # clresourcegroup create -n phys-schost-1,phys-schost-2 -p failback=true  \
    -p rg_description="Logical hostname schost-1 RG" \
    schost-1-rg
    # clreslogicalhostname create -h schost-1 -g schost-1-rg schost-1
    
  2. To create the logical hostname resource for node phys-schost-2, the following commands are run:


    # clresourcegroup create -n phys-schost-2,phys-schost-1 -p failback=true \
    -p rg_description="Logical hostname schost-2 RG" \
    schost-2-rg
    # clreslogicalhostname create -h schost-2 -g schost-2-rg schost-2
    
  3. To create a scalable resource group to contain the Oracle RAC server resource and Oracle listener resource, the following command is run:


    # clresourcegroup create -S \
    -p rg_affinities=++rac_framework-rg \
    -p rg_description="RAC 9i server and listener RG" \
    rac-db-rg
    
  4. To register the SUNW.scalable_rac_listener resource type, the following command is run:


    # clresourcetype register SUNW.scalable_rac_listener
    
  5. To add an instance of the SUNW.scalable_rac_listener resource type to the rac-db-rg resource group, the following command is run:


    # clresource create -g rac-db-rg \
    -t SUNW.scalable_rac_listener \
    -p resource_dependencies_weak=schost-1,schost-2 \
    -p listener_name\{phys-schost-1\}=LISTENER1 \
    -p listener_name\{phys-schost-2\}=LISTENER2 \
    -p oracle_home=/home/oracle/product/9.2.0  \
    scalable_rac_listener-rs
    

    A different value of the listener_name extension property is set for each node that can master the resource.

  6. To register the SUNW.scalable_rac_server resource type, the following command is run:


    # clresourcetype register SUNW.scalable_rac_server
    
  7. To add an instance of the SUNW.scalable_rac_listener resource type to the rac-db-rg resource group, the following command is run:


    # clresource create -g rac-db-rg \
      -t SUNW.scalable_rac_server
      -p resource_dependencies=rac_framework-rs, db-storage-rs
    -p resource_dependencies_weak=scalable_rac_listener-rs \
    -p oracle_home=/home/oracle/product/9.2.0 \
    -p connect_string=scooter/t!g3r \
    -p oracle_sid\{phys-schost-1\}=V920RAC1 \
    -p oracle_sid\{phys-schost-2\}=V920RAC2 \
    -p alert_log_file\{phys-schost-1\}=/home/oracle/9.2.0/rdbms/log/alert_V920RAC1.log \
    -p alert_log_file\{phys-schost-2\}=/home/oracle/9.2.0/rdbms/log/alert_V920RAC2.log \
    scalable_rac_server-rs
    

    A different value of the following extension properties is set for each node that can master the resource:

    • alert_log_file

    • oracle_sid

  8. To bring online the resource group that contains the Oracle RAC server resource and Oracle listener resource, the following command is run:


    # clresourcegroup online -emM rac-db-rg
    

Next Steps

Go to Verifying the Installation and Configuration of Sun Cluster Support for Oracle RAC.