Tuesday, April 7, 2015

Change Oracle RAC SCAN from host file to DNS

Step 1: verify the DNS is working and remove the host file record 

root@vmxdb01:~# nslookup
> vmxdb-scan.dbaglobe.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Name:   vmxdb-scan.dbaglobe.com
Address: 192.168.1.20
Name:   vmxdb-scan.dbaglobe.com
Address: 192.168.1.21
Name:   vmxdb-scan.dbaglobe.com
Address: 192.168.1.19

root@vmxdb01:~# vi /etc/hosts

## temporary hardcode scan host
#192.168.1.19    vmxdb-scan      vmxdb-scan.dbaglobe.com


Step 2: Stop the scan listener and scan


root@vmxdb01:~# srvctl stop scan_listener
root@vmxdb01:~# srvctl stop scan

Step 3: Modify the scan based on the IPs returned by scan host name
root@vmxdb01:~# srvctl config scan
SCAN name: vmxdb-scan, Network: 1/192.168.1.64/255.255.255.192/net0
SCAN VIP name: scan1, IP: /vmxdb-scan/192.168.1.19

root@vmxdb01:~# srvctl modify scan -n vmxdb-scan
root@vmxdb01:~# srvctl config scan 
SCAN name: vmxdb-scan, Network: 1/192.168.1.64/255.255.255.192/net0
SCAN VIP name: scan1, IP: /vmxdb-scan/192.168.1.19
SCAN VIP name: scan2, IP: /vmxdb-scan/192.168.1.20
SCAN VIP name: scan3, IP: /vmxdb-scan/192.168.1.21

Step 4: Update scan listener based on SCAN IPs

root@vmxdb01:~# srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1522

root@vmxdb01:~# srvctl modify scan_listener -u
root@vmxdb01:~# srvctl config scan_listener 
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1522
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1522
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1522

Step 5: Start the scan listener and scan

root@vmxdb01:~# srvctl start scan
root@vmxdb01:~# srvctl start scan_listener

No comments:

Post a Comment