Skip to content
Home » Oracle » How to Relocate SCAN Listener

How to Relocate SCAN Listener

Sometimes, we may find the scan vip and listeners are all located at one node.

[grid@primary01 ~]$ ps -ef | grep lsnr
grid      6077     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
grid      6256     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid      6258     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2 -no_crs_notify -inherit
grid      6266     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN4 -no_crs_notify -inherit
grid      6269     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
grid      6271     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
grid      6276     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
grid      6293     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN2_NET2 -no_crs_notify -inherit
grid      6299     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN3_NET2 -no_crs_notify -inherit
grid      6305     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN4_NET2 -no_crs_notify -inherit
grid     17608     1  0 14:36 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN1_NET2 -no_crs_notify -inherit
grid     17634 17401  0 14:36 pts/0    00:00:00 grep lsnr
[grid@primary01 ~]$ srvctl status scan_listener -k 1
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node primary01
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node primary01
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node primary01
SCAN Listener LISTENER_SCAN4 is enabled
SCAN listener LISTENER_SCAN4 is running on node primary01
[grid@primary01 ~]$ srvctl status scan_listener -k 2
SCAN Listener LISTENER2_SCAN1_NET2 is enabled
SCAN listener LISTENER2_SCAN1_NET2 is running on node primary01
SCAN Listener LISTENER2_SCAN2_NET2 is enabled
SCAN listener LISTENER2_SCAN2_NET2 is running on node primary01
SCAN Listener LISTENER2_SCAN3_NET2 is enabled
SCAN listener LISTENER2_SCAN3_NET2 is running on node primary01
SCAN Listener LISTENER2_SCAN4_NET2 is enabled
SCAN listener LISTENER2_SCAN4_NET2 is running on node primary01

As we can see, 8 scan listeners which work for their respective network are all located at the first node. This is nothing wrong with the clusterware, all functions are all workable. But for better load balancing, we can redistribute them evenly on all nodes.

Restarting scan or vip resource object will be not helpful. You should restart scan_listener.

[grid@primary01 ~]$ srvctl stop scan_listener -k 1
[grid@primary01 ~]$ srvctl stop scan_listener -k 2
[grid@primary01 ~]$ srvctl start scan_listener -k 1
[grid@primary01 ~]$ srvctl start scan_listener -k 2
[grid@primary01 ~]$ srvctl status scan_listener -k 1
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node primary02
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node primary01
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node primary01
SCAN Listener LISTENER_SCAN4 is enabled
SCAN listener LISTENER_SCAN4 is running on node primary02
[grid@primary01 ~]$ srvctl status scan_listener -k 2
SCAN Listener LISTENER2_SCAN1_NET2 is enabled
SCAN listener LISTENER2_SCAN1_NET2 is running on node primary01
SCAN Listener LISTENER2_SCAN2_NET2 is enabled
SCAN listener LISTENER2_SCAN2_NET2 is running on node primary02
SCAN Listener LISTENER2_SCAN3_NET2 is enabled
SCAN listener LISTENER2_SCAN3_NET2 is running on node primary01
SCAN Listener LISTENER2_SCAN4_NET2 is enabled
SCAN listener LISTENER2_SCAN4_NET2 is running on node primary02
[grid@primary01 ~]$ ps -ef | grep lsnr
grid      6077     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
grid      6256     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid      6258     1  0 14:27 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2 -no_crs_notify -inherit
grid     19469     1  0 14:42 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
grid     19491     1  0 14:42 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
grid     19799     1  0 14:43 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN1_NET2 -no_crs_notify -inherit
grid     19876     1  0 14:43 ?        00:00:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER2_SCAN3_NET2 -no_crs_notify -inherit

There left 4 scan listeners in this node, 2 for network #1 and 2 for network #2.

Leave a Reply

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