How to change hostname or domainname for Apps Instance Server

You sometime have to change hostname or domainname of your Apps Instance , today’s post list various options & things you need to note while changing hostname on your existing Apps Instance.

Use cloning for changing hostname or domainname
I am sure you might be surprised to see how cloning can change hostname or domainname , yes you are right cloning will not change host or domain name but cloning can be used to change pointers to old hostname or domainname in Apps Instance after changing hostname/domainname by operating system commands. Steps you have to do is

Run adpreclone on Instance where you want to change hostname/domainname
Release Unix/Linux machine to sysadmin for changing hostname
Run postclone with new hostname/domain with same SID to change new name into effect

Above method is easy & best which I can think .

Use Autoconfig to change hostname or domainname of machine hosting apps Instance
If Machine on which you want to change hostname/domainname is on application tier then you just change entries in $CONTEXT_NAME.xml
Change hostname or domainname using operating system commands
execute autoconfig on that Instance so that application tier register new hostname/domainname

If machine on which you want to change host/domain name also host Database Tier then you also need to Deregister database tier from Net Service Topology Model & Reregister it with new hostname settings.
If you want to learn more about Net Service Topology Model follow Metalink Note # 218089.1 Autoconfig FAQ Under Section Net Services Question 28 to 41

For exact steps on how to change hostname using Autoconfig follow Metalink Note # 338003.1 How to change the hostname and/or port of the Database Tier using AutoConfig

I recently completed OCA for Application Server Exam 1Z0-311 and will be sharing my experience with Oracle Certification for Application Server with you all. Stay tuned on Oracle Application Server Certification 1Z0-311 & lot more things.

Your feedback/comment is quite important for improving this blog so feel free to leave your comments & suggestions

About the Author Atul Kumar

Oracle ACE, Author, Speaker and Founder of K21 Technologies & K21 Academy : Specialising in Design, Implement, and Trainings.

follow me on:

Leave a Comment:

12 comments
Anonymous says November 22, 2006

Hi,
It is very good site with so many information rlated to apps and many more.
I’m very new in apps and trying to install apps-11.5.10, i followed below steps,
1st installing,
1.win 2003
2.craeting active directory
3.Jave 1.3
4.VC++
5.MKS Toolkit
6.Thn creating GNU
7.Rapidwiz.
But, may be some thing I was doing wrong, thats why I got error
“Utility not found” or which command is not working.
So if you give a proper installation steps from starting crash, then that will be helpfull for all. So will you pls send me the proper steps?

Regards,
Subir

Reply
Atul Kumar says November 23, 2006

Subir,
Oracle has written very noce document in Installation Guide & I suppose you have all required software .

As per message (Though its not clear) this seems that some utility is not in path.

I suggest you raise this is forum at http://teachmeoracle.com/forum with Installation logs related to error message .

Reply
Sam Eapen says February 19, 2007

Atul, good lead to the metalink doc ID..Since i had few issues, I suggest for the doc id : 338819.1 as an additional reference.For DBA has permission denied error while logging after changing the hostname. Please check the ICX_PARAMETERS view to update the session_cookie_domain manually to the new domain name.. Ideally s_cookie_domain parameter in the autoconfig suppose to update the ICX_PARAMETERS view, but it doesnt..

samintouch@gmail.com

Reply
Sam Eapen says February 19, 2007

Atul, good lead to the metalink doc ID..Since i had few issues, I suggest for the doc id : 338819.1 as an additional reference.For DBA has permission denied error while logging after changing the hostname. Please check the ICX_PARAMETERS view to update the session_cookie_domain manually to the new domain name.. Ideally s_cookie_domain parameter in the autoconfig suppose to update the ICX_PARAMETERS view, but it doesnt..

samintouch@gmail.com

Reply
Atul Kumar says February 19, 2007

Thanks Sam for sharing such a valuable information with readers

Atul

Reply
Aanjeneya says July 25, 2008

How do i change the domain name in R12 ?
please post some steps .

Regards
Aanjeneya

Reply
Atul says July 25, 2008

For R12 also folow same procedure

1. If there is just application tier sitting on that machine, change domain name in Context File and run Autoconfig
2. If node for which you wish to change domainname simple method is run preclone (before domainname change), change domainname & run postclone (all values same with new domainname value)

Reply
Ghafarkhani says December 10, 2009

Hi Atul,

What do you mean of “postclone”? would you please describe more? Do you have a step-by-step doc for this?

We have a single node oracle apps(11.5.10) and want to change hostname and domainname using autoconfig. The following are the exact steps that we did for this:

1. DB Tier: Deregister the current database server

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=’clone1′;

NAME SERVER_TYPE
————— ———–
clone1_PROD_DB DB

# cd $ORACLE_HOME/appsutil
# perl ./bin/adgentns.pl appspass= contextfile=./PROD_clone1.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=’clone1′;

no rows selected

2. DB Tier: Create a new Context file

# cd $ORACLE_HOME/appsutil
# perl ./bin/adclonectx.pl contextfile=./PROD_clone1.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 [clone1]:clone2
Target System database name [PROD]:
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [olddomain]:newdomain
Oracle OS User [oraprod]:
Oracle OS Group [dba]:
Target system RDBMS ORACLE_HOME directory [/gldb/apps/d02/oracle/proddb/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:/gldb/apps/d03/oracle/proddata
Do you want to preserve the Display set to m2mgltraining:0.0 (y/n) [y] ?:n
Target system Display [clone2:0.0]:
Target system JAVA_TOP location [null]:/gldb/apps/d01/oracle/prodcomn/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 [PROD_clone2.xml]:
Creating the new Database Context file from :
/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/PROD_clone2.xml

3. APPS Tier: Deregister the current Applications server

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=’clone1′;

NAME SERVER_TYP
—————– ———-
clone1_PROD_APPS APPS

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adgentns.pl appspass= contextfile=./PROD_clone1.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=’clone1′;

no rows selected

4. APPS Tier: Create a new Context file

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adclonectx.pl contextfile=./PROD_clone1.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 [clone1]:clone2
Target system database SID [PROD]:
Target system domain name [olddomain]:newdomain
Username for the applications file system owner [applprod]:
Group for the applications file system owner [dba]:
Target system database server node [clone1]:clone2
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 [/gldb/apps/d01/oracle/prodappl]:
Target system COMMON_TOP directory [/gldb/apps/d01/oracle/prodcomn]:
Target system 8.0.6 ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/8.0.6]:
Target system iAS ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/iAS]:
Do you want to preserve the Display set to clone1:0.0 (y/n) [y] ?:n
Target system Display [clone2: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 /gldb/apps/d01/oracle/pro
dappl/admin/out/PROD_clone2/portpool.lst
New context path and file name [PROD_clone2.xml]:
Creating the new APPL_TOP Context file from :
/gldb/apps/d01/oracle/prodappl/ad/11.5.0/admin/template/adxmlctx.tmp
The new APPL_TOP context file has been created :
/gldb/apps/d01/oracle/prodappl/admin/PROD_clone2.xml

5. APPS Tier: Shutdown the Applications Services

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

6. Change the hostname

# hostname -s clone2
# edit /etc/hosts as follow:
OLD: 10.0.65.23 clone1.olddomain clone1
NEW: 10.0.65.23 clone2.newdomain clone2

7. DB Tier: Reseed the Net Services Topology Model

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

8. APPS Tier: Reseed the Net Services Topology Model

# $AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/PROD_clone2.xml appspass=

9. DB Tier: Shutdown the database and listener

# $ORACLE_HOME/appsutil/scripts/PROD_clone1/addbctl.sh stop
# $ORACLE_HOME/appsutil/scripts/PROD_clone1/addlnctl.sh stop PROD

10. DB Tier: Edit sqlnet.ora

# cd $ORACLE_HOME/network/admin/PROD_clone2
# edit sqlnet.ora as follow:
OLD: tcp.invited_nodes=(clone1.olddomain, clone2.newdomain)
NEW: tcp.invited_nodes=(clone2.newdomain)

10. DB Tier: Start the listener and database

# $ORACLE_HOME/appsutil/scripts/PROD_clone2/addlnctl.sh start PROD
# $ORACLE_HOME/appsutil/scripts/PROD_clone2/addbctl.sh start

11. APPS Tier: Start the Applications Services

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

References:
1. How to change the hostname of an Applications Tier using AutoConfig [Metalink 341322.1]
2. How to change the hostname and/or port of the Database Tier using AutoConfig [Metalink 338003.1]

Everything were successfull, but when we want to start forms, we encounter the following errors in jinitiator console:

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)

at oracle.ewt.lwAWT.lwText.LWTextF
ield._calculateCanvasWidth(LWTextField.java:714)

at oracle.ewt.lwAWT.lwText.LWTextField.layoutCanvas(LWTextField.java:398)

at oracle.ewt.EwtComponent.layout(Unknown Source)

Do you have any idea?

Regards,

Reply
Atul Kumar says December 10, 2009

@ Ghafarkhani,
Your steps seems OK .

I think issue is because of class path not pointing to right location .

Do you have RESyntaxException.class in $OA_JAVA/org/apache/regexp

Is OA_JAVA in classpath ?

Reply
Ghafarkhani says December 12, 2009

Hi Atul,

1. The following is my classpath:

$ echo $CLASSPATH
/usr/java14/lib/tools.jar:/usr/java14/lib/dt.jar:/usr/java14/jre/lib/charsets.jar:/usr/java14/jre/lib/rt.jar:/gldb/apps/d01/oracle/prodcomn/java/appsborg2.zip:/gldb/apps/d01/oracle/prodcomn/java/regexp.jar:/gldb/apps/d01/oracle/prodora/8.0.6/forms60/java:/gldb/apps/d01/oracle/prodcomn/java/org/apache/regexp:/gldb/apps/d01/oracle/prodcomn/java

2. Yes, of course. We have RESyntaxException.class in $OA_JAVA/org/apache/regexp.

3. Yes. $OA_JAVA is in classpath too.

$ echo $OA_JAVA
/gldb/apps/d01/oracle/prodcomn/java

4. In jinitiator console, I see that all jar files are downloaded except regexp.jar!

Regards,
Ghafarkhani

Reply
Ghafarkhani says December 14, 2009

Hi,

Finally I found the problem. The problem was the value of ‘archive2’ in $OA_HTML/bin/appsweb_PROD_clone2.cfg after running autoconfig. It should have the following value whereas it was null!

archive2=,/OA_JAVA/regexp.jar

I found this using adchkcfg.sh (AutoConfig Test Mode). I ran Autoconfig in Test Mode, then checked cfgcheck.txt (Differences text report) of this script. By looking into all “Diff files” reported in cfgcheck.txt, I saw that the above parameter in appsweb_PROD_clone2.cfg, has lost its value after running autoconfig!

Thanks a lot for your helps.

Regards,
Ghafarkhani

Reply
bubbles says January 9, 2010

Do you know a note / instructions to change domain name of RAC node? We had a typo in /etc/hosts during RAC creation, and repaired it. But now listeners won’t start, and get ora-12516 error (no surprise, huh).

Reply
Add Your Reply

Not found