# Real Application Clusters (RAC) of Oracle Database

# 11.2

# SRVCTL Command

# VIP

~]# $GRID_HOME/bin/srvctl remove vip -i oracle11gasm01
Please confirm that you intend to remove the VIPs oracle11gasm01 (y/[n]) y
~]# $GRID_HOME/bin/srvctl remove vip -i oracle11gasm02
Please confirm that you intend to remove the VIPs oracle11gasm02 (y/[n]) y
~]# $GRID_HOME/bin/srvctl add vip -h
Adds a VIP to the Oracle Clusterware.
Usage: srvctl add vip -n <node_name> -k <network_number> -A <name|ip>/<netmask>/[if1[|if2...]] [-v]
    -n <node_name>           Node name
    -A <vip_name|ip>/<netmask>/[if1[|if2...]]  VIP address spec for node applications
    -k <net_num>             network number (default number is 1)
    -h                       Print usage
    -v                       Verbose output
~]# $GRID_HOME/bin/srvctl add vip -n oracle11gasm01 -A rac03-vip/255.255.255.0/ens192 -k 1
~]# $GRID_HOME/bin/srvctl add vip -n oracle11gasm02 -A rac04-vip/255.255.255.0/ens192 -k 1
~]# $GRID_HOME/bin/srvctl config vip -n oracle11gasm01
VIP exists: /rac03-vip/192.168.3.163/192.168.3.0/255.255.255.0/ens192, hosting node oracle11gasm01
~]# $GRID_HOME/bin/srvctl config vip -n oracle11gasm02
VIP exists: /rac04-vip/192.168.3.164/192.168.3.0/255.255.255.0/ens192, hosting node oracle11gasm02
~]# $GRID_HOME/bin/srvctl config nodeapps -a
Network exists: 1/192.168.3.0/255.255.255.0/ens192, type static
VIP exists: /rac03-vip/192.168.3.163/192.168.3.0/255.255.255.0/ens192, hosting node oracle11gasm01
VIP exists: /rac04-vip/192.168.3.164/192.168.3.0/255.255.255.0/ens192, hosting node oracle11gasm02
~]# $GRID_HOME/bin/srvctl start vip -n oracle11gasm01
~]# $GRID_HOME/bin/srvctl start vip -n oracle11gasm02
~]# $GRID_HOME/bin/crsctl stat res -t | grep -A1 vip
ora.oracle11gasm01.vip
      1        ONLINE  ONLINE       oracle11gasm01
ora.oracle11gasm02.vip
      1        ONLINE  ONLINE       oracle11gasm02
Edited on