Sun Cluster Data Service for Oracle Real Application Clusters Guide for Solaris OS

ProcedureHow to Register and Configure Oracle Listener Resources

Steps
  1. On one node of the cluster, become superuser.

  2. Register the SUNW.oracle_listener resource type.


    # scrgadm -a -t SUNW.oracle_listener
    
  3. If your configuration of Oracle listeners requires a separate resource group, create a failover resource group for the listener resource.

    Create this resource group only if your configuration of Oracle listeners requires a separate resource group. When you create this resource group, create any dependencies on other resource groups that your configuration requires. For more information, see Resource Groups for Oracle Listener Resources.


    # scrgadm -a -g rac-listener-rg \
    [-y RG_DEPENDENCIES=rg-list]\
    -h nodelist
    
    -g rac-listener-rg

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

    -y RG_DEPENDENCIES=rg-list

    Specifies a comma-separated list of resource groups that this resource group depends on. If the Oracle home directory resides on a Sun StorEdge QFS shared file system, rg-list must specify the resource group for the Sun StorEdge QFS metadata server for the file system.

    If the resource group for the listener resource depends on no other resource groups, omit this option.

    -h nodelist

    Specifies a comma-separated list of nodes where the resource group can be brought online. The list may contain more than one node only if you are configuring the listener to use a LogicalHostname resource. Otherwise, you must specify only one node.

  4. Add an instance of the SUNW.oracle_listener resource to each resource group that is to contain a SUNW.oracle_listener resource.

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

    • The name of the Oracle listener. This name must match the corresponding entry in the listener.ora file.

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


    # scrgadm -a -j listener-resource -g listener-rg \
    -t SUNW.oracle_listener \
    [-y RESOURCE_DEPENDENCIES=sqfs-rs-list] \
    -x LISTENER_NAME=listener \ 
    -x ORACLE_HOME=oracle-home
    
    -j listener-resource

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

    -g listener-rg

    Specifies the resource group to which you are adding the resource.

    -y RESOURCE_DEPENDENCIES=sqfs-rs-list

    Specifies a comma-separated list of Sun StorEdge QFS resources on which this Oracle listener instance depends. These resources are created when you register and configure the data service for the Sun StorEdge QFS metadata server. For more information about these resources, see SPARC: Resources for the Sun StorEdge QFS Shared File System. Create this dependency only if the Oracle home directory resides on a Sun StorEdge QFS shared file system.

    -x LISTENER_NAME=listener

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

    -x 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.

  5. Bring online each RAC server resource group that you created in How to Register and Configure Oracle RAC Server Resources.

    For each resource group, type the following command:


    # scswitch -Z -g rac-server-rg
    
    -Z

    Moves the resource group to the MANAGED state, and brings online the resource group

    -g rac-server-rg

    Specifies that a resource group that you created in How to Register and Configure Oracle RAC Server Resources is to be moved to the MANAGED state and brought online

  6. If you created Oracle listener resource groups in Step 3, bring online these resource groups.

    For each resource group that you created, type the following command:


    # scswitch -Z -g rac-listener-rg
    
    -Z

    Moves the resource group to the MANAGED state, and brings online the resource group

    -g rac-listener-rg

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


Example 3–4 Registering and Configuring Oracle Listener Resources

This example shows the sequence of operations that is required to register and configure Oracle RAC listener resources for a two-node cluster.

In this example, each listener serves only one Real Application Clusters instance. The listeners cannot fail over.

The example assumes that RAC server resource groups named RAC1-rg and RAC2-rg have been created as shown in Example 3–3.

  1. To register the SUNW.oracle_listener resource type, the following command is run:


    # scrgadm -a -t SUNW.oracle_listener
    
  2. To create the LRAC1-rs resource in the RAC1-rg resource group for node node1, the following command is run:


    # scrgadm -a -j LRAC1-rs -g RAC1-rg \
    -t SUNW.oracle_listener \
    -x LISTENER_NAME=LRAC1 \
    -x ORACLE_HOME=/oracle
    
  3. To create the LRAC2-rs resource in the RAC2-rg resource group for node node2, the following command is run:


    # scrgadm -a -j LRAC2-rs -g RAC2-rg \
    -t SUNW.oracle_listener \
    -x LISTENER_NAME=LRAC2 \
    -x ORACLE_HOME=/oracle
    

Next Steps

Go to Verifying the Sun Cluster Support for Oracle Real Application Clusters Installation and Configuration.