Wednesday, June 8, 2016

Change hostname for E-Business Suite Release 12 on single node in Linux

Below Scenario Database and Applications are in Same Server.

1. DB Tier: Deregister the current database server

Current database server node needs to be de-registered. 

Check server name:

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 
--------------- ----------- 
host_<SID>_DB DB 

Need to deregister the current database server: 

perl $ORACLE_HOME/appsutil/bin/adgentns.pl appspass=<APPSpwd> contextfile=./<SID>_oldhost.xml -removeserver

Verification:

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 <SID>_oldhost.xml <SID>_newhost.xml

Edit <SID>_newhost.xml file and replace all oldhost with newhost

b. Script Method:

perl $ORACLE_HOME/appsutil/clone/bin/adclonectx.pl contextfile=$CONTEXT_FILE

Provide values as per new hostname

3. APPS Tier: Deregister the current Applications server

Check server name:

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_<SID>_APPS APPS 

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

Verification:

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 <SID>_oldhost.xml <SID>_newhost.xml

Edit <SID>_newhost.xml file and replace all oldhost with newhost

b. Script Method:

cd $INST_TOP/appl/admin 
perl $COMMON_TOP/clone/bin/adclonectx.pl contextfile=./<SID>_oldhost.xml

Provide values as per new hostname

5. Shutdown the Applications

cd $INST_TOP/admin/scripts 

./adstpall.sh apps/<appspasswd>

6. Change the server machine hostname.


7. Run Autocofig on DB and Application Nodes

DB Side:

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

APPS Side:

cd $ADMIN_SCRIPTS_HOME
./adconfig.sh contextfile= <SID>_newhost.xml appspass=<appspasswd>

8. Shutdown the database and listener

-bash-3.2$lsnrctl stop <listener name>

-bash-3.2$ sqlplus '/as sysdba'

SQL> shut immediate

9. Start the listener and database

     Source you new environment file
    
    -bash-3.2$ sqlplus '/as sysdba'
   
     SQL> startup
    
    -bash-3.2$lsnrctl start <listener name>
    
10.Start the Application Tier Services

    cd $ADMIN_SCRIPTS_HOME
    
    ./adstrtal.sh apps/<appspasswd>

No comments:

Post a Comment