Monday, June 2, 2008

Change hostname, ip address of an Oracle Application Server SOA suite (

It is possible to change the hostname ip address from a linux server where Oracle Application Server SOA suite ( is installed.
The following steps need to be executed:
1. Stop the Oracle Application Server
opmnctl shutdown

2. Change the network linux server settings
Change hostname/ip address in /etc/hosts
Change hostname/ip address in /etc/sysconfig/network
Change ip address in /etc/sysconfig/network-scripts/ifcfg-eth0

Execute command hostname:
hostname {HOST_NAME_NEW}

3. Execute script

4. Find and replace the hostname in all the files of the ORACLE_HOME. These files can be found with the following command:
find ./ -type f -name '*' -print0  xargs -0 grep -li -e "{HOST_NAME_ORG}"

I created a script to do this for me: searchreplace


if [ $# != 2 ];
echo "Start op: $0 "
exit 1


for FILE in `find ./ -type f -name '*' -print0 | xargs -0 grep -li -e "${REPLACE_WORD}"`
echo "In the ${FILE} the word ${REPLACE_WORD} is replaced by ${WORD}."
cat ${FILE} | sed 's/'${REPLACE_WORD}'/'${WORD}'/g' > ${FILE}_TMP
mv ${FILE}_TMP ${FILE}

exit 0

5. Start Oracle Database which is used for the SOA metadata repository and Update table ORAESB.ESB_PARAMETER en DT_OC4J_HOST:

sqlplus oraesb
update oraesb.esb_parameter
set param_value='$HOST_NAME_NEW.$HOST_DOMAIN_NEW'
where param_name ='DT_OC4J_HOST';

6. Start Oracle Application Server:
opmnctl startall


  1. Hello

    can one tar the files from original host and untar them on the new host and run the commands that u mentioned above. will this work?

  2. Hi,

    Yes I suppose this will work. In our case we made an master Virtual machine that we clone to a new virtual machine and we did the steps in the blog.

    The application server is working fine! So a tar should work also.

    Kind regards,


  3. Thanks for the reply. Forgot to add that we are using 10.1.2.

    how about the metadata under INFRA? Will this work as well ?

  4. also can u please point me to the correct steps of how to clone, INFRA as well a mid-tier?

  5. This blog was for 10.1.3.x for the 10.1.2 infra this is not so easy because of the metadata repository. I do not have any experience with this version and changing ip addresses.

  6. Thanks for the quick reply. This is causing us issues....

    Thanks anyways...

  7. Hello

    Nice blogs... lots of good information here...

    I had a comment on Portal 10.1.4. since there was no comments section there i am putting it here. Sorry abt this...

    We use portal 10.1.4 and we are having issues doing an export/import of the personalizations. the personalizations of the WSRP portlets gets lost during the import. If we customize it in say region A (default) and i move it to tab B. After we do an import the portlet goes bak to A tab.

    Is there anything that we are missing interms of setup etc?