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
- Copy the XML file to Virtual Host Name
cd $ORACLE_HOME/appsutil cp PROD_erpdb01.xml PROD_erpdb.xml
- Change all host entries from
erpdb01
toerpdb
in the new XML file. - Change an entry in the
adautocfg.sh
- 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"
- 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)) ) ) )
- Run
Autoconfig.sh
(before running, make sure you get a response fromping erpdb
and that it points to DB Node 1). - Check that the Autoconfig run has no errors and connects to the DB.
- DB node 1 has now been set up.
Now failover the VIP to second DB node.
On the second DB node
- Copy the XML file to Virtual Host Name.
cd $ORACLE_HOME/appsutil $cp PROD_erpdb02.xml PROD_erpdb.xml
- Change all host entries from
erpdb02
toerpdb
in the new XML file. - In
adautocfg.sh
, changeCTX_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"
- 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)) ) ) )
- Run
Autoconfig.sh
(before running it, make sure you get a response fromping erpdb
and that points to DB Node 2). - Check that the Autoconfig run has no errors and that it connects to the DB.
- The DB node 2 has now been set up.
Apps-Side Setups
On Apps Server #1
- In the XML file, change
db_host
to the DB Virtual name. - Run autoconfig.
- Check the logfile for errors.
tnsping
should show a connection to the Virtual DB Node name.
Now, failover the VIP to second APPS Node.
On Apps Server #2
- In the XML file, change db_host to DB Virtual name.
- Run autoconfig.
- Check the logfile for errors.
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.
- Make sure vip has failed to DB Node B (ping
erpdb
, you should see it reachable). - Bring up the database on Node B.
- Bounce Apps on Node A.
Scenario B
We make the same assumptions as above.
- Make sure vip has failed to APPS Node B (ping
erpapp
, you should see it reachable). - run autoconfig on Apps Node B.
- Bounce Apps on Node B.
Everything should work now.
Share this
You May Also Like
These Related Stories
No Comments Yet
Let us know what you think