Friday, November 2, 2012

Creating an Application VIP Managed by Oracle Clusterware

Creating an Application VIP Managed by Oracle Clusterware

If clients of an application access the application through a network, and the placement policy for the application allows it to fail over to another node, then you must register a virtual internet protocol address (VIP) on which the application depends. An application VIP is a cluster resource that Oracle Clusterware manages (Oracle Clusterware provides a standard VIP agent for application VIPs). 
 
You should base any new application VIPs on this VIP type to ensure that your system experiences consistent behavior among all of the VIPs that you deploy in your cluster.

While you can add a VIP in the same way that you can add any other resource that Oracle Clusterware manages, Oracle recommends using the script Grid_home/bin/appvipcfg to create or delete an application VIP.


To create an application VIP, use the following syntax:


appvipcfg create -network=network_number -ip=ip_address -vipname=vip_name -user=user_name [-group=group_name] [-failback=0 | 1]


To delete an application VIP, use the following syntax:


appvipcfg delete -vipname=vip_name

Where network_number is the number of the network, ip_address is the IP address, vip_name is the name of the VIP, user_name is the name of the user who installed Oracle Database, and group_name is the name of the group. The default value of the -failback option is 0.
 
If you set the option to 1, then the VIP (and therefore any resources that depend on VIP) fails back to the original node when it becomes available again.


For example, as root, run the following command:


# Grid_home/bin/appvipcfg create -network=1 -ip=148.87.58.196 -vipname=appsVIP -user=root
The script only requires a network number (default is 1), the IP address, and a name for the VIP resource, as well as the user that owns the application VIP resource. A VIP resource is typically owned by root because VIP related operations require root privileges.


To delete an application VIP, use the same script with the delete option. This option accepts the VIP name as a parameter. For example:


# Grid_home/bin/appvipcfg delete -vipname=appsVIP


After you have created the application VIP using this configuration script, you can view the VIP profile using the following command:


Grid_home/bin/crsctl status res appsVIP -p

Verify and, if required, modify the following parameters using the Grid_home/bin/crsctl modify res command.

The appvipcfg script assumes that the default ora.vip network resource (ora.net1.network) is used as the default. In addition, it is also assumes that a default app.appvip_net1.type is used for those purposes.

As the Oracle Database installation owner, start the VIP resource:
$ crsctl start resource appsVIP



Adding an Application VIP with Oracle Enterprise Manager

To add an application VIP with Oracle Enterprise Manager:
  1.  Log into Oracle Enterprise Manager Database Control.
  2.  Click the Cluster tab.
  3.  Click Administration.
  4.  Click Manage Resources.
  5.  Enter a cluster administrator user name and password to   display the Manage Resources page.
  6.  Click Add Application VIP.
  7.  Enter a name for the VIP in the Name field.
  8.  Enter a network number in the Network Number field.
  9.  Enter an IP address for the VIP in the Internet Protocol Address field.
  10. Enter root in the Primary User field. Oracle Enterprise Manager defaults to whatever user name you are logged in as.
  11. Select Start the resource after creation if you want the VIP to start immediately.
  12. Click Continue to display the Confirmation: Add VIP Resource page.
  13. Enter root and the root password as the cluster credentials.
  14. Click Continue to create the application VIP.





No comments:

Post a Comment