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 guide 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.
SQL> show parameters local_listener NAME TYPE VALUE ---------------------- ----------------------------------------- local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=node-IP-number)(PORT=port-number)) SQL>
When the Oracle database is restarted, Oracle Clusterware dynamically sets the local_listener parameter.
SQL> alter system set local_listener='' scope=both; System altered.
SQL> show parameters local_listener
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 …
SQL> show parameter remote_listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_listener string SCAN-name:port-number SQL>
SQL> alter system set remote_listener='SCAN-name:port-number' scope=both
SQL> show parameter remote_listener
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SCAN-name)(PORT = port-number)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )