Skip to content

Insight and analysis of technology and business strategy

Setting up Virtual Hosts for Database and Applications Tiers in 11i

I would like to share with you the virtual hosts set-up (two nodes each on the application tier, and two on the DB tier) for a customer using 11.5.9.

The Facts

  • DB Version: 10.2.3
  • CRS Version: 10.2.0.3
  • ASM Version: 10.2.0.3
  • APPS Version: 11.5.9

Set-ups by Sys-Admins

Sysadmins must set up a virtual hostname amongst the two available middle-tier (Applications) hosts. In our case, the hostnames are erpapp01, and erpapp02. Then the sysadmins set up a VIP as erpapp.

We also require from sysadmins virtual hostname amongst the two available backend (database) hosts. Hostnames in our case are erpdb01, and erpdb02. They then set up a VIP as erpdb.

Set-ups By DBAs

Here, we Assume DB Node 1 is currently active, and that CONTEXT_NAME = PROD.

On the first DB Node

  1. Copy the XML file to Virtual Host Name
    cd $ORACLE_HOME/appsutil
    cp PROD_erpdb01.xml PROD_erpdb.xml
  2. Change all host entries from erpdb01 to erpdb in the new XML file.
  3. Change an entry in the adautocfg.sh
  4. Change
    CTX_FILE="/opt/oracle/product/10.2.0/db_1/appsutil/PROD_erpdb01 .xml"

    to

    CTX_FILE="/opt/oracle/product/10.2.0/db_1/appsutil/PROD_erpdb.xml"
  5. Open Listener.ora and add
    (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb)(PORT = 1521)(IP = FIRST))

    This will look like:

    LISTENER_ERPDB01 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb01-vip)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb)(PORT = 1521)(IP = FIRST))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.12.101)(PORT = 1521)(IP = FIRST))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    )
    )
  6. Run Autoconfig.sh (before running, make sure you get a response from ping erpdb and that it points to DB Node 1).
  7. Check that the Autoconfig run has no errors and connects to the DB.
  8. DB node 1 has now been set up.

Now failover the VIP to second DB node.

On the second DB node

  1. Copy the XML file to Virtual Host Name.
    cd $ORACLE_HOME/appsutil
    $cp PROD_erpdb02.xml PROD_erpdb.xml
  2. Change all host entries from erpdb02 to erpdb in the new XML file.
  3. In adautocfg.sh, change
    CTX_FILE="/opt/oracle/product/10.2.0/db_1/appsutil/PROD_erpdb02.xml"

    to

    CTX_FILE="/opt/oracle/product/10.2.0/db_1/appsutil/PROD_erpdb.xml"
  4. Open Listener.ora and add (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb)(PORT = 1521)(IP = FIRST)). It will look like:
    LISTENER_ERPDB01 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb02-vip)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = erpdb)(PORT = 1521)(IP = FIRST))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.12.102)(PORT = 1521)(IP = FIRST))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    )
    )
  5. Run Autoconfig.sh (before running it, make sure you get a response from ping erpdb and that points to DB Node 2).
  6. Check that the Autoconfig run has no errors and that it connects to the DB.
  7. The DB node 2 has now been set up.

Apps-Side Setups

On Apps Server #1

  1. In the XML file, change db_host to the DB Virtual name.
  2. Run autoconfig.
  3. Check the logfile for errors.
  4. tnsping should show a connection to the Virtual DB Node name.

Now, failover the VIP to second APPS Node.

On Apps Server #2

  1. In the XML file, change db_host to DB Virtual name.
  2. Run autoconfig.
  3. Check the logfile for errors.
  4. tnsping should show a connection to the Virtual DB Node name.

It’s all setup now.

Test the Failover procedures

Scenario A

Let’s assume that both the DB and Apps run on node A, and that DB Node A crashes.

  1. Make sure vip has failed to DB Node B (ping erpdb, you should see it reachable).
  2. Bring up the database on Node B.
  3. Bounce Apps on Node A.

Scenario B

We make the same assumptions as above.

  1. Make sure vip has failed to APPS Node B (ping erpapp, you should see it reachable).
  2. run autoconfig on Apps Node B.
  3. Bounce Apps on Node B.

Everything should work now.

Top Categories

  • There are no suggestions because the search field is empty.

Tell us how we can help!

dba-cloud-services
Upcoming-Events-banner