A good example on configuring SCAN for clients, Pas from Oracle has written an article which explains how this can be achieved. Just visit his blog entry Using SCAN – Single Client Access Name to Connect to 11g R2 RAC from JDeveloper 11g.
Configuring your clients to used SCAN in 11.2 or later is optional, however when you install the Grid Infrastructure software for RAC, the SCAN is still required to be configured for setup of the cluster.
It is recommended that the SCAN is resolvable to 3 IP addresses. However a minimum of 1 IP Address may be configured. It should also be registered in DNS for round robin resolution.
Reconfiguration of SCAN
There may be situations where reconfiguration of the SCAN for the cluster is required.Some examples are:
- Allocation of IP addresses has changed for SCAN
- Adding additional IP addresses for SCAN
- DNS Changes associated with SCAN addressing
- SCAN name change^
In the below scenario, the following steps will show how SCAN addressing can be reconfigured for a cluster.
At the time of the installation, the DNS registration had not been setup. As a workaround, one of the IP addresses allocated for the SCAN was referenced in the /etc/hosts file. Once the installation was completed and DNS registration updated, the SCAN was then reconfigured to be resolvable through DNS for all 3 IP addresses.
Below is the summary of the current and new configuration for SCAN.
Current | New | |
SCAN Name | myscan | myscan |
SCAN IP Address | 172.43.22.89 | 172.43.22.89 172.43.22.90 172.43.22.91 |
SCAN entry in /etc/hosts file | Yes* | No |
Registered in DNS and configured for round robin | No | Yes |
NOTE: SCAN entry in the /etc/hosts file is not recommended, hence the reconfiguration to the NEW is required.
1. Verify Current Configuration for SCAN VIP
oracle@lnx01[GRID]:/app/oracle> srvctl config scan SCAN name: myscan, Network: 1/172.43.22.0/255.255.255.0/bge0:nxge0 SCAN VIP name: scan1, IP: /myscan.earth.com/172.43.22.892. Verify status of SCAN Listener:
oracle@lnx01[GRID]:/app/oracle> srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node lnx02
3. Verify Current Configuration for SCAN Listener
oracle@lnx01[GRID]:/app/oracle> srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:15214. Verify Status for SCAN Listener
oracle@lnx01[GRID]:/app/oracle> srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node lnx025. Stop the SCAN Listener
oracle@lnx01[GRID]:/app/oracle> srvctl stop scan_listener6. Stop the SCAN VIPs
oracle@lnx01[GRID]:/app/oracle> srvctl stop scan
7. Verify Status for SCAN Listener has stopped
oracle@lnx01[GRID]:/app/oracle> srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is not running8. Verify Status for SCAN VIP has stopped
oracle@lnx01[GRID]:/app/oracle> srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is not running9. Update SCAN in DNS and associated IPs as required 10. Verify that resolv.conf is configured to search DNS domain that SCAN was registered for
oracle@lnx01[GRID]:/app/oracle> cat /etc/resolv.conf search earth.com nameserver 172.43.7.1 nameserver 172.44.7.111. Verify that in DNS that that the SCAN is resolvable against all three IP Addresses
oracle@lnx01[GRID]:/app/oracle> nslookup myscan Server: 172.43.7.1 Address: 172.43.7.1#53 Name: myscan.earth.com Address: 172.43.22.89 Name: myscan.earth.com Address: 172.43.22.90 Name: myscan.earth.com Address: 172.43.22.9112. Verify that the scan IP and address name has been removed or commented out from the /etc/hosts file:
oracle@lnx01[GRID]:/app/oracle> grep myscan /etc/hosts
NOTE: In this example no rows are returned as IP and address name has been removed for scan
13. Modify the SCAN resource so that it update all SCAN VIPs resolvable by DNS
oracle@lnx01[GRID]:/app/oracle> sudo srvctl modify scan -n myscan14. If the SCAN name was changed as well, run the following to update in Cluster Resource Control
oracle@lnx01[GRID]:/app/oracle> sudo crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=myscan"15. Verify that all SCAN VIPs are now resolvable and registered with the SCAN resource
oracle@lnx01[GRID]:/app/oracle> srvctl config scan SCAN name: myscan, Network: 1/172.43.22.0/255.255.255.0/bge0:nxge0 SCAN VIP name: scan1, IP: /myscan.earth.com/172.43.22.90 SCAN VIP name: scan2, IP: /myscan.earth.com/172.43.22.91 SCAN VIP name: scan3, IP: /myscan.earth.com/172.43.22.8916. Update the SCAN Listener with new SCAN VIPs identified from DNS
oracle@lnx01[GRID]:/app/oracle> srvctl modify scan_listener -u17. Verify new SCAN Listeners registered for new SCAN VIPs
oracle@lnx01[GRID]:/app/oracle> srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN3 exists. Port: TCP:152118. Start SCAN Listener NOTE: This will also start the SCAN VIPs
oracle@lnx01[GRID]:/app/oracle> srvctl start scan_listener19. Verify Status of all three SCAN VIPs have been enabled and are running.
oracle@lnx01[GRID]:/app/oracle> srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node lnx02 SCAN VIP scan2 is enabled SCAN VIP scan2 is running on node lnx01 SCAN VIP scan3 is enabled SCAN VIP scan3 is running on node lnx0120. Verify Status of all three SCAN Listeners have been enabled and are running.
oracle@lnx01[GRID]:/app/oracle> srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node lnx02 SCAN Listener LISTENER_SCAN2 is enabled SCAN listener LISTENER_SCAN2 is running on node lnx01 SCAN Listener LISTENER_SCAN3 is enabled SCAN listener LISTENER_SCAN3 is running on node lnx01
No comments:
Post a Comment