DMK_HA virtual IP solution for Microsoft Windows
The script called “dmk_vip.ps1” manages such VIP, it is furnished within this package and it allows to manage a vitual IP linked to a database in the same manner we recommend on Unix/Linux systems.
Purpose
The script “dmk_vip.ps1” allows starting and stopping a VIP configured in a database context. The VIP configuration goes through a simple and easy configuration file (see later).
The purpose of the script is to manage VIP. It is easy to manage and robust. The main specifications of the tool are the following ones :
“dmk_vip.ksh” can manage several VIP (one per database)
before starting up a VIP it must make sure that the same VIP is not running somewhere else (in this case this VIP must be stopped)
Specifications
The VIP specification consist in a list of parameters:
Oracle instance: SID
Address of the VIP (IP which will be used by Oracle clients to connect to the database)
Network mask in use for the VIP definition
Physical network interface to bind the VIP to
Number of iterations to stop the VIP if the VIP is already running of multiple nodes (default: 2)
Requirements
In order to be able to start a VIP on a Microsoft Windows network interface, the dmk_vip.ps1 requires Administrator privileges to access the WMI classes and Netsh utility from PowerShell.
Add to the PowerShell console “Run as Administrator” privilege per default
Navigate to Powershell console Advanced Properties (right click on the shortcut)
Depending on the Microsoft Windows version you might find the “Run as Administrator” property either in the security or advanced tab
Verify the Oracle database Windows Service (OracleService<ORACLE_SID>) starts with a domain user
Required to manage the Virtual IP remotely
Windows Firewall configured to
Allow remote queries on the WMI classes
Proper name for the public network interface (ie: LAN)
Follows the required FireWall enabled Inbound rules Microsoft Windows Server 2012:
File and Printer Sharing (Echo Request - ICMPv4-In)
Windows Management Instrumentation (DCOM-In)
Windows Management Instrumentation (WMI-In)
Use following PowerShell command to check the state and scope of a rule:
Enable those inbound rules from a PowerShell Console as follows:
Configure the WinRM service, to start automatically with your system and adapt the firewall rules:
Configuration
The complete “dmk_vip.ps1” configuration should be performed in the dmk_vip.conf file located in $DMK_HA/etc. A template configuration file available in $DMK_HA/templates:
The syntax of the configuration file is presented below:
The VIP (parameter VIP_ADR) will be started on the physical interface (VIP_IF).
It is possible to define a number of iteration during dmk_vip.ksh will trying to stop existing VIPs with the same address. If, due to some wrong manipulations, the VIP has been started on several nodes, the dmk_vip.ps1 script will try to stop all of them before starting the VIP on the local node. Per default these "zombies" VIP will be stopped on maximum two nodes. If the Data Guard or Dbvisit cluster has 4 nodes, it might be useful to try to stop the VIP "zombies" on all the nodes of the cluster before starting it on the local node, therefore increase NBR_NODES to 4.
Usage
Configuration: dmk_vip.cfg
Start the VIP:
Stop the VIP:
Check Virtual IP on interface LAN (VIP 172.22.30.33):
Database integration/automation
The “dmk_vip.ps1” integration with the database is quite simple as it consists of two (2) components:
A STARTUP_TRIGGER which fires after “startup on database” and if the current database role (V$DATABASE.database_role) is PRIMARY.
Executable DBMS_SCHEDULER jobs VIP_STOP and VIP_START
Install trigger and scheduler jobs as follows:
Or
Last updated