Sun Cluster Data Service for Oracle RAC Guide for Solaris OS

Creating Resources for Interoperation With Oracle 10g by Using Sun Cluster Maintenance Commands

The task in this section is an alternative for the resource-configuration steps in How to Enable Sun Cluster and Oracle 10g R2 CRS to Interoperate

Resources for interoperation with Oracle 10g R2 enable you to administer RAC database instances by using Sun Cluster interfaces. These resources also ensure that dependencies by Oracle CRS resources on Sun Cluster resources are met. These resources enable the high-availability frameworks that are provided by Sun Cluster and Oracle CRS to interoperate.

The following resources for interoperation with Oracle 10g are required:

You must assign to an Oracle CRS resource that represents a Sun Cluster resource a name in the following form:

sun.node.sc-rs

node

Specifies the name of the node where the Oracle CRS resource is to run.

sc-rs

Specifies the name of the Sun Cluster resource that the Oracle CRS resource represents.

For example, the name of the Oracle CRS resource for node pclus1 that represents the Sun Cluster resource scal-dg-rs must be as follows:

sun.pclus1.scal-dg-rs

Figure D–1 Proxy Resources for Configurations With a Volume Manager

Diagram showing proxy resources for Oracle 10g configurations with a volume manager

Figure D–2 Proxy Resources for Configurations With a Shared File System

Diagram showing proxy resources for Oracle 10g configurations with a shared file system

ProcedureHow to Create Sun Cluster Resources for Interoperation With Oracle 10g

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. Register the SUNW.crs_framework resource type.


    # clresourcetype register SUNW.crs_framework
    
  3. Add an instance of the SUNW.crs_framework resource type to the RAC framework resource group.

    For information about this resource group, see Registering and Configuring the RAC Framework Resource Group.

    Set a strong dependency by the instance of SUNW.crs_framework on the instance of SUNW.rac_framework in the RAC framework resource group.

    You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.

    You might have configured a storage resource for the file system that you are using for binary files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running. Set the dependency on the resource that you created in How to Create a Resource for a File-System Mount Point.


    # clresource create -t SUNW.crs_framework \
    -g rac-fmwk-rg \
    -p resource_dependencies=rac-fmwk-rs \
    [-p resource_dependencies_offline_restart=db-storage-rs{local_node}\
    [,bin-storage-rs{local_node}]] \
    crs-fmwk-rs
    
  4. Create a scalable resource group to contain the proxy resource for the Oracle RAC database server.

    Set a strong positive affinity by the scalable resource group for the RAC framework resource group.

    You might have configured a storage resource for the storage that you are using for database files. In this situation, set a strong positive affinity by the scalable resource group for the resource group that contains the storage resource for database files.


    Tip –

    If you require Sun Cluster Support for Oracle RAC to run on all cluster nodes, specify the -S option in the command that follows and omit the options -n, -p maximum_primaries, -p desired_primaries, and -p rg_mode.



    # clresourcegroup create -n nodelist \
    -p maximum_primaries=num-in-list \
    -p desired_primaries=num-in-list \
    -p rg_affinities=++rac-fmwk-rg[,db-storage-rg] \
    [-p rg_description="description" \]
    -p rg_mode=Scalable \
    rac-db-rg
    
  5. Register the SUNW.scalable_rac_server_proxy resource type.


    # clresourcetype register SUNW.scalable_rac_server_proxy
    
  6. Add an instance of the SUNW.scalable_rac_server_proxy resource type to the resource group that you created in Step 4.

    Set a strong dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.rac_framework in the RAC framework resource group.

    Set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.crs_framework that you created in Step 3.

    You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.

    Set a different value of the oracle_sid extension property for each node that can master the resource.


    # clresource create -g rac-db-rg \
    -t SUNW.scalable_rac_server_proxy \
    -p resource_dependencies=rac-fmwk-rs \
    -p resource_dependencies_offline_restart=crs-fmk-rs[, db-storage-rs] \
    -p oracle_home=ora-home \
    -p crs_home=crs-home \
    -p db_name=db-name \
    -p oracle_sid{node1-id}=sid-node1 \
    [ -p oracle_sid{node2-id}=sid-node2 \…]
    rac-srvr-proxy-rs
    
  7. Bring online the resource group that you created in Step 4.


    # clresourcegroup online -emM rac-db-rg
    

ProcedureHow to Create an Oracle CRS Resource for Interoperation With Sun Cluster

Oracle CRS resources are similar to Sun Cluster resources. Oracle CRS resources represent items that the CRS manage in a similar way to how Sun Cluster resources represent items that the Sun Cluster RGM manages.

Depending on your configuration, some Oracle components that are represented as CRS resources might depend on file systems and global devices that Sun Cluster manages. For example, if you are using file systems and global devices for Oracle files, the Oracle RAC database and the Oracle listener might depend on these file systems and global devices.

Create an Oracle CRS resource for each Sun Cluster resource for scalable device groups and scalable file-system mount points on which Oracle components depend. The Oracle CRS resources that you create track the status of their associated Sun Cluster resources. The Oracle CRS resources also ensure the orderly startup of Oracle CRS resources.

Perform this task on each cluster node where Sun Cluster Support for Oracle RAC is to run.


Note –

Some steps in this procedure require you to use Oracle CRS commands. In these steps, the syntax of the command for Oracle release 10g R2 is provided. If you are you are using a version of Oracle other than 10g R2, see your Oracle documentation for the correct command syntax.


  1. On the node where you are performing this task, become superuser.

  2. If the /var/cluster/ucmm/profile directory does not exist, create it.

    Profiles for CRS resources are created in this directory.


    # mkdir -p /var/cluster/ucmm/profile
    
  3. Create a profile for the Oracle CRS resource.


    # crs-home/bin/crs_profile \
    -create sun.node.sc-rs \
    -t application -d  "description "  \
    -dir /var/cluster/ucmm/profile \
    -a /opt/SUNWscor/dsconfig/bin/scproxy_crs_action \
    -p restricted -h node -f -o st=1800
    
  4. Register the Oracle CRS resource for which you created a profile in Step 3.


    # crs-home/bin/crs_register sun.node.sc-rs \
    -dir /var/cluster/ucmm/profile
    
  5. Ensure that the Sun Cluster resource for which the Oracle CRS resource is a proxy is online.

    1. Obtain the state of the Sun Cluster resource.


      # clresource status sc-rs
      
    2. If the state of the Sun Cluster resource is not online, bring online the resource group that contains the Sun Cluster resource.

      If the state of the Sun Cluster resource is online, omit this step.


      # clresourcegroup -emM sc-rg
      
  6. Start the Oracle CRS resource that you registered in Step 4.


    # crs-home/bin/crs_start sun.node.sc-rs
    
  7. Add the Oracle CRS resource that you registered in Step 4 to the list of resources that the dependent Oracle CRS resource requires.

    1. If the dependent Oracle CRS resource is the Oracle RAC database instance, obtain the name of the instance.


      # crs-home/bin/srvctl config database -d db-name | grep node
      
    2. Obtain the list of resources that the dependent Oracle CRS resource requires.


      # crs-home/bin/crs_stat -p depend-crs-rs | grep REQUIRED_RESOURCES
      
    3. Append the name of the Oracle CRS resource to the list that you obtained in Step b.


      # crs-home/bin/crs_register depend-crs-rs \
      -update -r "existing-list sun.node.sc-rs"