Monday 3 May 2010

How to Change IP, Hostname, Domain and Ports - Oracle E-Business Suite

This post will help you to change of IP, hostname, domain and ports setting from single node instance of existing oracle e-business suite configuration. Most of them are aware of how to reconfigure an E-Business 11i system using AutoConfig, (i will explain the steps for autoconfig in next post) however certain configuration changes are not reflected in the configuration files. The Net Services Topology Data Model stores the entire topological information about a single Oracle Application instance. The data model stores information about each node in the Oracle Applications instance which is then used to generate the Net Service configuration files (for example tnsnames.ora). AutoConfig seeds the data model with relevant data.

The Net Services Topology Data Model stores the following information:
On the database tier: Hostname, Database SID, Database Name, Instance Name, TNS Descriptors.....
On the application tier: Hostname, FNDFS and FNDSM alias descriptors.........

This functionality is causing confusion for those who are trying to reconfigure their existing systems using AutoConfig. Changes such as hostname or Database port are not reflected in the configuration files after AutoConfig is run.

In Oracle E-Business Suite IP address is not dependent, so one can easily change the IP address of nodes without any effect on E-Business Suite.

But Hostname, Domain and Ports are not like that, Oracle E-Business Suite is dependent to these entries. So, we couldn’t change these values without co-ordination of E-Business Suite itself.
There are two methods available for changing Hostname, Domain and Ports of Oracle E-Business Suite. The first method, that will be explaining here, is using autoconfig and another method is by cloning. It is very easy to use autoconfig method to change hostname, domain and ports and use cloning method for changing other configurations of Oracle E-Business Suite.

In this post, assume that our E-Business Suite has just one node so that all Tiers and Servers reside on this node. For changing hostname, domain and ports of a multinode Oracle E-Business Suite, please refere metalink note: 341322.1 - How to change the hostname of an Applications Tier using AutoConfig, metalink note: 338003.1 - How to change the hostname and/or port of the Database Tier using AutoConfig  and Note: 391406.1 - How to get a clean Autoconfig Environment.


a. DB Tier: Deregister the current database server (Required)

As the database hostname and domain will be changed, the current database server node needs to be de-registered. To deregister the current database server node, run the following command as the owner of the Oracle RDBMS file system and current database instance :

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');

NAME            SERVER_TYPE
--------------- -----------
oldhost_DEVT_DB  DB

# cd $ORACLE_HOME/appsutil
# perl ./bin/adgentns.pl appspass= contextfile=./DEVT_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');
no rows selected

b. DB Tier: Create a new Context file

You can create the new context file using whichever of the following methods:
a. Manuall Method:
# cd $ORACLE_HOME/appsutil
# cp PROD_oldhost.xml DEVT_newhost.xml
Edit DEVT_newhost.xml manually:
Replace all oldhost with newhost
Replace all olddomain with newdomain


b. Script Method:
# cd $ORACLE_HOME/appsutil
# perl ./bin/adclonectx.pl contextfile=./DEVT_oldhost.xml

Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target System database name [DEVT]:
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [olddomain]:newdomain
Oracle OS User [oradevt]:
Oracle OS Group [dba]:
Target system RDBMS ORACLE_HOME directory [/oracle/devtdb/9.2.0]:
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [4]:1
Target system DATA_TOP 1:/oracle/devtdata
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Target system JAVA_TOP location [null]:/oracle/devtcomn/java
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Database port is 1521
New context path and file name [DEVT_newhost.xml]:
Creating the new Database Context file from :
/oracle/devtdb/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/oracle/devtdb/9.2.0/appsutil/DEVT_newhost.xml

Note: The command above will create a new Context file of the format DEVT_newhost.xml in the current working directory.

c. APPS Tier: Deregister the current Applications server

As the Applications hostname and domain will be changed, the current Applications server node needs to be de-registered.
To deregister the current Applications server node, run the following command as the owner of the Oracle Applications file system and current database instance:

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');
NAME              SERVER_TYP
----------------- ----------
oldhost_DEVT_APPS  APPS

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adgentns.pl appspass= contextfile=./DEVT_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');

no rows selected

d. APPS Tier: Create a new Context file

You can create the new context file using whichever of the following methods:


a. Manuall Method:
# cd $APPL_TOP/admin
# cp DEVT_oldhost.xml DEVT_newhost.xml
Edit DEVT_newhost.xml manually:
Replace all oldhost with newhost
Replace all olddomain with newdomain


b. Script Method:
# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adclonectx.pl contextfile=./DEVT_oldhost.xml

Provide the values required for creation of the new APPL_TOP Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target system database SID [DEVT]:
Target system domain name [olddomain]:newdomain
Username for the applications file system owner [appldevt]:
Group for the applications file system owner [dba]:
Target system database server node [oldhost]:newhost
Does the target system have more than one application tier server node (y/n) [n] ?:
Is the target system APPL_TOP divided into multiple mount points(y/n)[n]?:
Target system APPL_TOP mount point [/apps/devtappl]:
Target system COMMON_TOP directory [/apps/devtcomn]:
Target system 8.0.6 ORACLE_HOME directory [/apps/devtora/8.0.6]:
Target system iAS ORACLE_HOME directory [/apps/devtora/iAS]:
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Location of JDK 1.3.1 on the target system [/usr/java14]:
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Web Listener port is 8000
Complete port information available at /apps/devtappl/admin/out/DEVT_newhost/portpool.lst
New context path and file name [DEVT_newhost.xml]:
Creating the new APPL_TOP Context file from :
/apps/devtappl/ad/11.5.0/admin/template/adxmlctx.tmp
The new APPL_TOP context file has been created :
/apps/devtappl/admin/DEVT_newhost.xml

Note: The command above will create a new Context file of the format DEVT_newhost.xml in the current working directory.

e. APPS Tier: Shutdown the Application Tier Services

# $COMMON_TOP/admin/scripts/DEVT_oldhost/adstpall.sh apps/

f. Change the hostname and domain

Change the hostname and domain at OS level.
# hostname -s newhost
# edit /etc/hosts as follow:
OLD: IP-Address     oldhost.olddomain     oldhost
NEW: IP-Address     newhost.newdomain     newhost

Verify that the /etc/sysconfig/network file contains an entry that is similar to the following:
HOSTNAME=.
Check to see if the /etc/sysconfig/networking/profiles/default/network file exists. If it does, remove it.
If you changed any files in the previous steps, reboot the system.

g. DB Tier: Reseed the Net Services Topology Model

# cd $ORACLE_HOME/appsutil
# ./bin/adconfig.sh contextfile=./DEVT_newhost.xml

h. APPS Tier: Reseed the Net Services Topology Model

The Net Services Topology Model is automatically updated by running AutoConfig.
# $AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/DEVT_newhost.xml appspass=

i. DB Tier: Shutdown the database and listener

# $ORACLE_HOME/appsutil/scripts/DEVT_oldhost/addbctl.sh stop
# $ORACLE_HOME/appsutil/scripts/DEVT_oldhost/addlnctl.sh stop DEVT

j. DB Tier: Start the listener and database
# $ORACLE_HOME/appsutil/scripts/DEVT_newhost/addlnctl.sh start DEVT
# $ORACLE_HOME/appsutil/scripts/DEVT_newhost/addbctl.sh start

k. APPS Tier: Start the Application Tier Services

# $COMMON_TOP/admin/scripts/DEVT_newhost/adstrtal.sh apps/

Sometimes you will encounter the following errors when you start the listener?
Error listening on: (ADDRESS=(PROTOCOL=TCP)(Host=newhost)(Port=1521))
TNS-12532: TNS:invalid argument
TNS-12560: TNS:protocol adapter error
TNS-00502: Invalid argument
IBM/AIX RISC System/6000 Error: 515: Error 515 occurred.

Please check $ORACLE_HOME/network/admin/DEVT_newhost/sqlnet.ora to insure it is using new values:
OLD: tcp.invited_nodes=(oldhost.olddomain, newhost.newdomain)
NEW: tcp.invited_nodes=(newhost.newdomain)

Another possible error is that in Jinitiator console when you try to start form applications?
java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException
at oracle.ewt.lwAWT.lwText.LWTextField.getText(LWTextField.java:196)
at oracle.ewt.lwAWT.lwText.LWTextField._getDisplayString(LWTextField.java:787)

Please change $OA_HTML/bin/appsweb_DEVT_newhost.cfg for the value of ‘archive2′. It should be as follow:
archive2=,/OA_JAVA/regexp.jar

May be this also will encounter you when start Jinitiator console form applications?
java.lang.Error: RE internal error: Corrupt program
at org.apache.regexp.RE.internalError(RE.java:820)
at org.apache.regexp.RE.matchNodes(RE.java:1414)

Do make the following changes in JAVA_TOP
# cd $JAVA_TOP
# mv org org.back

Please send your comments....

Related Posts by Categories



No comments: