Second SCAN-Listener

Since Oracle 12c you create and use a second (or even more) SCAN-Listener for Load-Balancing, Failover, etc. This can be useful to separate Network traffic e.g. for Dataguard or Shareplex replication. Like the ordinary SCAN-Listener you need two additional VIP- and three additional SCAN-Addresses. In the following example I want to separate the Dataguard traffic between a RAC Database with two nodes (morrison and manzarek) and a single node (daltrey) RAC Database as standby.

Configuration Details

You need, of course, a physical network first. Like eth0 or bond0 we are going to use eth2 in this example. All dataguard network specific names can be identified by the postfix “_dg”. To make the configuration more realistic I’m not using the standard ports but dedicated ports for both the dataguard listener (1853) and dataguard scan listener (1854).

So let’s start with the root-Part of the installation. I will only show the commands for the RAC database because the standby database is using the same commands again.

  1. Add a network
  2. srvctl add network -netnum 2 -subnet -nettype static
  3. Add and start the VIP-Addresses
  4. srvctl add vip -node morrison -netnum 2 -address morrison-dg-vip/ 
    srvctl add vip -node manzarek -netnum 2 -address manzarek-dg-vip/ 
    srvctl start vip -node morrison -netnum 2 
    srvctl start vip -node manzarek -netnum 2
  5. Add the Scan
  6. srvctl add scan -scanname doors-dg -netnum 2 srvctl start scan -netnum 2
  7. Now it’s time to configure the listeners so we need to switch to the grid infrastructure owner (oragrid in my example).
  8. srvctl add listener -listener listener_dg -netnum 2 -endpoints "TCP:1653" 
    srvctl start listener -listener listener_dg
    srvctl add scan_listener -netnum 2 -listener doors-dg -endpoints "TCP:1654" 
    srvctl start scan_listener -netnum 2

That’s it. Our second SCAN listener and listener are running and by magic the database parameters will pick up the configuration automatically (listener_networks).

SQL> show parameter listener  
NAME                                 TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
listener_networks                    string      (( NAME=net2)(LOCAL_LISTENER=(
												 1853))))), ((NAME=net2)(REMOTE
local_listener                       string       (ADDRESS=(PROTOCOL=TCP)(HOST=
remote_listener                      string       doors.carajandb.intra:1852

Unfortunately this only works with the base release ( and the first PSUs. Since PSU 5 (so I’ve tested with 5 (October 2015 and 6 (January 2016)) listener_networks is empty.

SQL> show parameter listener  
NAME                                 TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
listener_networks                    string 
local_listener                       string       (ADDRESS=(PROTOCOL=TCP)(HOST=
remote_listener                      string       doors.carajandb.intra:1852, d
                                                  oors.carajandb.intra:1852, doo

To change the configuration you first need to apply patch 19884033 because it solves the bug that listener_networks cannot be modified.

Now you need to add the parameter listener_networks, local_listener and remote_listener manually:

ALTER SYSTEM SET listener_networks='((NAME=net2)(LOCAL_LISTENER="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=morrison-dg-vip)(PORT=1853)))")(REMOTE_LISTENER=doors-dg:1854))'; 
ALTER SYSTEM SET remote_listener='doors.carajandb.intra:1652';

That’s it to use a dedicated network for your dataguard or shareplex traffic. All HA features are available as usual.

My concern is that the parameters have been changed not only for the listener_network but also for the remote listener. As you can see in the example above the host and port has been entred three times and the command ALTER SYSTEM SET LOCAL_LISTENER … will be added to the alert file every minute. So hopefully this original settings will be available again with the next PSU.

No comments on “Second SCAN-Listener

Leave a Reply

Your email address will not be published. Required fields are marked *

What can CarajanDB do for you?