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.
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.
Here, we Assume DB Node 1 is currently active, and that CONTEXT_NAME = PROD.
cd $ORACLE_HOME/appsutil cp PROD_erpdb01.xml PROD_erpdb.xml
erpdb01 to erpdb in the new XML file.adautocfg.shCTX_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"
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)) ) ) )
Autoconfig.sh (before running, make sure you get a response from ping erpdb and that it points to DB Node 1).Now failover the VIP to second DB node.
cd $ORACLE_HOME/appsutil $cp PROD_erpdb02.xml PROD_erpdb.xml
erpdb02 to erpdb in the new XML file.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"
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)) ) ) )
Autoconfig.sh (before running it, make sure you get a response from ping erpdb and that points to DB Node 2).db_host to the DB Virtual name.tnsping should show a connection to the Virtual DB Node name.Now, failover the VIP to second APPS Node.
tnsping should show a connection to the Virtual DB Node name.It’s all setup now.
Let’s assume that both the DB and Apps run on node A, and that DB Node A crashes.
erpdb, you should see it reachable).We make the same assumptions as above.
erpapp, you should see it reachable).Everything should work now.
Ready to optimize your Oracle Database for the future?