Monday, December 31, 2012

How to change hostname for E-Business Suite Release 12 on single node




How to change hostname for E-Business Suite Release 12 on single node

Oracle Applications Manager - Version 12.0.1 to 12.1.2 [Release 12 to 12.1]
Information in this document applies to any platform.



Oracle E-Business Suite is dependent to hostname and domain. Assume that E-Business Suite has just one node so that all Tiers and Servers reside on this node. Please refer to following to modify the hostname on EBS R12.

For Windows EBS server users,  that have to open a command window and source the mks Enviroenment to be able to execute below Unix commands.



Fix

1. DB Tier: Deregister the current database server

As the database hostname and domain will be changed, the current database server node needs to be de-registered.

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='old_hostname';


NAME SERVER_TYPE
--------------- -----------
oldhost__DB DB 

Executing following commands to deregister the current database server:
cd $ORACLE_HOME/appsutil
perl ./bin/adgentns.pl appspass= contextfile=./_oldhost.xml -removeserver

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='old_hostname';


no rows selected.

2. DB Tier: Create a new Context file

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

a. Manual Method:
cd $ORACLE_HOME/appsutil
cp _oldhost.xml _newhost.xml

Edit _newhost.xml manually: 
Replace all oldhost with newhost
b. Script Method:(The command below will create a new Context file of the format _newhost.xml in the current working directory.) 
cd $ORACLE_HOME/appsutil
perl ./clone/bin/adclonectx.pl contextfile=./_oldhost.xml

**************************************************************************************************************************

Enter the APPS password :   
Log file located at /appsutil/CloneContext_1223165155.log 
Provide the values required for creation of the new Database Context file.
Target System Hostname (virtual or normal) [nascapp6] :
It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:
-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.
Do you want the inputs to be validated (y/n) [n] ? :
Target Instance is RAC (y/n) [n] :
Target System Database SID :  
Target System Base Directory :  
Oracle OS User [oravis] :
Oracle OS Group [dba] :
Target System utl_file_dir Directory List :/usr/tmp
Number of DATA_TOP's on the Target System [4] : 1
Target System DATA_TOP Directory 1 : /d01/oracle/PROD/db/apps_st/data <------- data="data" files="files" input="input" nbsp="nbsp" of="of" p="p" path="path" the="the" your="your">Target System RDBMS ORACLE_HOME Directory [/d01/oracle/PROD/db/tech_st/11.1.0] :
Do you want to preserve the Display [null] (y/n) ? : n
Target System Display [newhost:0.0] :
Do you want the the target system to have the same port values as the source system (y/n) [y]?:
Complete port information available at /appsutil/out/_nascapp6/portpool.lst 
New context path and file name [/appsutil/PROD_nascapp6.xml] : 
Creating the new Database Context file from :
/appsutil/template/adxdbctx.tmp 
The new database context file has been created :
/appsutil/PROD_nascapp6.xml 
Log file located at /appsutil/CloneContext_1223170424.log 
contextfile=/appsutil/PROD_nascapp6.xml 
Check Clone Context logfile /appsutil/CloneContext_1223170424.log for details. 
**************************************************************************************************************************
3. 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.

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='old_hostname';


NAME SERVER_TYP
----------------- ----------
oldhost__APPS APPS 

Executing following commands to deregister the current Applications server:
cd $APPL_TOP/admin
perl $AD_TOP/bin/adgentns.pl appspass= contextfile=./_oldhost.xml -removeserver

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='old_hostname';


no rows selected.
 4. APPS Tier: Create a new Context file

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

a. Manual Method:
cd $APPL_TOP/admin
cp _oldhost.xml _newhost.xml

Edit _newhost.xml manually: 
Replace all oldhost with newhost
b. Script Method:(The command below will create a new Context file of _newhost.xml in new _newhost directory.) 
cd $INST_TOP/appl/admin
perl $COMMON_TOP/clone/bin/adclonectx.pl contextfile=./_oldhost.xml


**************************************************************************************************************************

Enter the APPS password : apps
Log file located at $INST_TOP/appl/admin/CloneContext_1223173053.log
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [nascapp6] :
It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:
-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.
Do you want the inputs to be validated (y/n) [n] ? :
Target System Database SID :  
Target System Database Server Node [nascapp6] :
Target System Base Directory :  
Target System Tools ORACLE_HOME Directory [<10 .1.2=".1.2">] : 
Target System Web ORACLE_HOME Directory [<10 .1.3=".1.3">] : 
Target System APPL_TOP Directory [<$APPL_TOP>] :
Target System COMMON_TOP Directory [<$COMMON_TOP>] :
Target System Instance Home Directory [<$INST_TOP>] :
Username for the Applications File System Owner [applvis] :
Group for the Applications File System Owner [dba] :
Target System Root Service [enabled] :
Target System Web Entry Point Services [enabled] :
Target System Web Application Services [enabled] :
Target System Batch Processing Services [enabled] :
Target System Other Services [disabled] :
Do you want to preserve the Display [oldhost:0.0] (y/n) ? : newhost:0.0
Target System Display [newhost:0.0] :
New context path and file name [$INST_TOP/appl/admin/_newhost.xml] : 
**************************************************************************************************************************

5. APPS Tier: Shutdown the Application Tier Services

cd $INST_TOP/admin/scripts
./adstpall.sh apps/

6. Change the server machine hostname.

Please contact your IT administrator to change the machine hostname.
7. DB Tier: Reseed the Net Services Topology Model

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

8. 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= $INST_TOP/../_newhost//appl/admin/_newhost.xml appspass=

9. DB Tier: Shutdown the database and listener

$ORACLE_HOME/appsutil/scripts/_oldhost/addbctl.sh stop 
$ORACLE_HOME/appsutil/scripts/_oldhost/addlnctl.sh stop

10. DB Tier: Start the listener and database

$ORACLE_HOME/appsutil/scripts/_newhost/addlnctl.sh start  
$ORACLE_HOME/appsutil/scripts/_newhost/addbctl.sh start

11. APPS Tier: Start the Application Tier Services

$INST_TOP/admin/scripts/_newhost/adstrtal.sh apps/


No comments:

Post a Comment