I have 12.0.1.2 node RAC system on Linux 64 bit.

I had some e-mails from our developer team about database connection problems. They got “ORA-12541: TNS:no listener” error message.

I started to investigate issue by checking current status of services by using below command:

crsctl stat res -t

I noticed that SCAN_LISTENER service status were UNKNOWN.

I checked rac listener up or not on my system.

[oracle@node1]</home/oramgr> ps -ef|grep inherit
oracle 10420314 1 0 09:59:27 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER -inherit

[oracle@node2]</home/oramgr> ps -ef|grep inherit
oracle 10420314 1 0 09:59:27 - 0:00 /oracle/app/12cgrid/bin/tnslsnr LISTENER -inherit
oracle 12386336 1 0 10:27:16 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER_SCAN2 –inherit
oracle 15663244 1 0 10:11:31 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER_SCAN1 –inherit

Checking Ip’s:

[oracle@node2]</home/oramgr> srvctl config scan
SCAN name: test-scan.mydomain.com, Network: 1/192.168.1.x/255.255.255.x/en1
SCAN VIP name: scan1, IP: /test-scan.mydomain.com/192.168.x.x.xxx
SCAN VIP name: scan2, IP: /test-scan.mydomain.com/192.168.xx.xxy

While I checked my IP configuration, I noticed node1 SCAN VIP has been  moved to Node2.

You can check it by using ifconfig -a command

After that I run below command to see what is current status by checking the SCAN details on node2.

To see what is option for relocate the scan is:

$ srvctl relocate scan -h

Usage: srvctl relocate scan -i <ordinal_number> [-n <node_name>]
-i <scan_ordinal_number> Ordinal number of IP address
-n <node_name> SCAN VIP node name
-h Print usage

So here is my steps:

1. Checking current status:

[oracle@node2]</home/oracle> srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node node2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node node2


[oracle@node2]</home/oracle> srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node node2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node node2
[oracle@node2]</home/oracle> ps -ef|grep inherit
oracle 10420314 1 0 09:59:27 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER -inherit
oracle 12386336 1 0 10:27:16 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER_SCAN2 –inherit
oracle 15663244 1 0 10:11:31 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER_SCAN1 –inherit

2. Relocate SCAN_LISTENER:

As you see my LISTENER_SCAN1 moved from node1 to node2, so I need to relocate from node2 to node1

srvctl relocate scan_LISTENER -i 1 -n node1

3. Check current status after Relocate SCAN_LISTENER:

[oracle@node2]</home/oracle> srvctl status scan

SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node node1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node node2


[oracle@node2]</home/oracle> srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node node1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node node2

[oracle@node2]</home/oracle> ps -ef|grep inherit
oracle 10420314 1 0 09:59:27 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER -inherit
oracle 12386336 1 0 10:27:16 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER_SCAN2 –inherit

[oracle@node1]</home/oracle> ps -ef|grep inherit
oracle 10420314 1 0 09:59:27 - 0:00 /oracle/app/12c/grid/bin/tnslsnr LISTENER -inherit

So What is difference is between relocating the SCAN using srvctl relocate scan and SCAN_LISTENER  by using srvctl relocate scan_listener command?

Regarding questions; The difference between a SCAN VIP and a normal RAC VIP, is that the RAC VIP has a node it want’s to run on and each node has one (whereas you only have 3 SCANs). If it fails over to another node, the normal VIP exists, but does not accept connections, whereas the SCAN is not fix to a node and can run on any node in the cluster (and will accept connections anytime).

Now that this works, the SCAN VIP will always move with the SCAN listener (otherwise it would not make any sense). Hence there is really no difference in moving the SCAN VIP (because this will trigger a relocate of the listener) or to move the SCAN_Listener (since this will move the VIP it depends on).

Source:
http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf
Top 5 Issues That Cause Troubles with Scan VIP and Listeners [ID 1373350.1]

Reklam