Go to main content

Oracle® Solaris Cluster Data Service for Oracle Database Guide

Exit Print View

Updated: June 2017
 
 

How to Configure an Oracle Grid Infrastructure SCAN Listener

When the HA for Oracle Database data service is deployed using Oracle Grid Infrastructure for Clusters, the preferred listener for a single-instance database is to use the Single Client Access Name (SCAN) listener. To leverage a SCAN listener in the HA for Oracle Database configuration, you must ensure that the single-instance database local_listener and remote_listener parameters are correctly set.

For more information about the SCAN listener, see the Oracle Grid Infrastructure installation guide for your version of Oracle Grid Infrastructure software.

Before You Begin

Observe the following guidelines:

  • Ensure that the IP address you use for the SCAN listener will be on the same subnet as the IP address you will configure for the logical hostname resource of the Oracle Database resource group. Otherwise, the Oracle Database resource will not fail over if the public network fails.

  • If you configure a SCAN listener, you can ignore later instructions in this manual for creating an Oracle Database listener resource with the SUNW.oracle_listener resource type. An Oracle Database listener resource is unnecessary when the SCAN listener is configured.

  1. As the database user, log in to Oracle Database using SQL*Plus.
  2. Ensure that the local_listener parameter contains the local listener IP number and port number.
    1. Display the local_listener parameter settings.
      SQL> show parameters local_listener
      NAME                   TYPE        VALUE
      ---------------------- -----------------------------------------
      local_listener         string      (ADDRESS=(PROTOCOL=TCP)(HOST=node-IP-number)(PORT=port-number))
      SQL>
    2. If the local_listener parameter does not contain the local listener IP number and port number, set the parameter to a blank value and restart the Oracle database.

      When the Oracle database is restarted, Oracle Clusterware dynamically sets the local_listener parameter.

      SQL> alter system set local_listener='' scope=both;
      System altered.
    3. Verify that the local_listener parameter settings are correct.
      SQL> show parameters local_listener
  3. Ensure that the remote_listener parameter refers to the SCAN name and port number.
    1. Determine whether the remote_listener parameter contains the SCAN name and port number.
      phys-schost$ srvctl config scan
      SCAN name: SCAN-name, Network: network-number
      …
      phys-schost$ srvctl config scan_listener
      SCAN Listener LISTENER_SCAN1 exists. Port: TCP:port-number
    2. Determine whether the remote_listener parameter contains the SCAN name and port number.
      SQL> show parameter remote_listener
      
      NAME                                 TYPE        VALUE
      ------------------------------------ ----------- ------------------------------
      remote_listener                      string       SCAN-name:port-number
      SQL>
    3. If the remote_listener parameter does not contain the SCAN name and port number, set the parameter with those values.
      SQL> alter system set remote_listener='SCAN-name:port-number' scope=both
    4. Verify the SCAN settings in the remote_listener parameter.
      SQL> show parameter remote_listener
  4. On each cluster node, ensure that the tnsnames.ora file refers to the SCAN name for the Net Service Name.
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = SCAN-name)(PORT = port-number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )