Skip to Content
Author's profile photo Former Member

How to Change SAP System’s Hostname

Changing SAP System’s Hostname

Assumptions

  • SAP server is running smoothly
  • Operating System is Microsoft Windows 2003
  • Database is Oracle
  • Valid for only AS ABAP Stack

Changing Hostname will be done in 5 Steps

Step 1 : Stopping SAP & Change Hostname on OS.

Step 2 : Changing Hostname in Oracle Profiles.

Step 3 : Changing Hostname in SAP profiles.

Step 4 : Running ORADBUSER.SQL Script

Step 5 : Uninstall and Install Service

STEP 1

It includes Stopping SAP & Oracle services and changing the hostname at OS Level

     i)     Stop SAP and Shutdown database

    • Stop SAP through Management Console
    • Right click on PRD and select Stop.

/wp-content/uploads/2013/09/1_274473.png

    • Stop Database
    • Logon to Sqlplus and type command “shutdown immediate;”

/wp-content/uploads/2013/09/2_274474.png

     ii)     Stop all SAP and Oracle services and set it to manual from Automatic.

            Goto –> services.msc and stop all SAP and Oracle Services and set all automatic services to manual 

/wp-content/uploads/2013/09/3_274484.png

iii)     Changing the hostname at OS Level

Right Click on My Computer –> Properties –> Computer Name and enter the new host name

  /wp-content/uploads/2013/09/5_274485.gif
  

Change hostname in Hosts File


Goto –> C:\windows\system32\drivers\etc and open File “Hosts” and enter the new hostname

/wp-content/uploads/2013/09/6_274486.gif

Change the Environment variable “SAPLOCALHOST”


Set the new value for SAPLOCALHOST i.e. enter the new hostname

/wp-content/uploads/2013/09/7_274490.gif

STEP 2 

First Please take the backup of all profiles before changing them.

i) Changing Listener.ora file

     Goto –> Oracle_home\Network\Admin in my case it is D:\oracle\PRD\102\Network\Admin

And change the entry “HOST” in listener.ora

/wp-content/uploads/2013/09/9_274492.gif

     ii) Changing Tnsnames.ora

Goto –> Oracle_home\Network\Admin in my case it is D:\oracle\PRD\102\Network\Admin

And change the entry “HOST” in tnsnames.ora

/wp-content/uploads/2013/09/11_274493.gif

 

STEP 3


i) Changing Default.pfl

Goto –> \usr\sap\<SID>\SYS\Profile and change hostname in default.pfl

/wp-content/uploads/2013/09/13_274495.gif

ii) Changing START_DVEBMGS<SYSNR>_<HOST>

Goto –> \usr\SAP\<SID>\SYS\Profile

    • COPY START_DVEBMGS<SYSNR>_<HOST> file and replace the hostname
    1. e.g.

CURRENT FILE NAME: START_DVEBMGS00_PRD

NEW FILE NAME       : START_DVEBMGS00_NEWPRD

  • Open the file and change the value of parameter SAPGLOBALHOST and profile name which are marked with red

/wp-content/uploads/2013/09/14_274505.gif

 
  

iii) Changing <SID>_DVEBMGS<SYSNO>_<HOSTNAME>

COPY <SID>_DVEBMGS<SYSNR>_<HOST> file and replace the hostname

                         e.g.

CURRENT FILE NAME: R3P_DVEBMGS00_PRD

NEW FILE NAME       : R3P_DVEBMGS00_NEWPRD

Open the file and change the value of parameter SAPGLOBALHOST

/wp-content/uploads/2013/09/15_274506.gif

STEP 4

Download ORADBUSER.SQL script from SAP Note 50088

Run ORADBUSER.SQL script (Instructions  how to run script is mentioned in the script)

STEP 5

Open a command prompt

Sapstartsrv

Uninstall the service

/wp-content/uploads/2013/09/16_274507.png

Restart the Server

Open the command prompt

Sapstartsrv

/wp-content/uploads/2013/09/16_274507.png

Enter the System Details

Profile : \usr\sap\PRD\sys\profile\ and select the start Profile

User : .\sapserviceadm

Install the service

Restart the SAP System

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Informative...Thanks.

      Best Regards,

      Naresh K.

      Author's profile photo Himanshu sharma
      Himanshu sharma

      A very useful document.

      Was in need of such document.

      Thanks and Regards,

      Himanshu

      Author's profile photo Former Member
      Former Member

      Thanks for sharing.Can I know will this work for dual stack systems??

      Regards,

      Bharath Parsi.

      Author's profile photo Juan Reyes
      Juan Reyes

      No, it will not be enough for a dual stack system.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      yup this is only for AS ABAP systems running on Windows with oracle its DB

      Author's profile photo Former Member
      Former Member

      Hi Juan

      Do you have got steps for dual stack system?

      Regards

      Arshiyan

      Author's profile photo Juan Reyes
      Juan Reyes

      To change the hostname of any system the most effective is to do a system copy. Why?.. simple it ensure that all parameters/config including host and domain is updated.

      For dualstack system you should perform a Homogeneous system copy, Including an export/import of the java engine. Use the System copy guide for reference.

      Also read,

      For a Java System read,

      Note 757692 - Changing the hostname for J2EE Engine 6.40/7.0 installation

      For and ABAP System read,

      Note 8307 - Changing host name on R/3 host: What do you do?

      Author's profile photo Yves KERVADEC
      Yves KERVADEC

      Hello

      Thanks for sharing but there are some important steps that are missing.

      At first this is not fully supported by SAP, check the remarks in the beginning of note 8307.

      Before changing the hostname make sure to suspend all jobs (report BTCTRNS1) as jobs are server name related.

      After changing the hostname there are some actions that need to be performed

      => Change the login groups & RFC group definition (transaction SMLG & RZ12)

      => Change print server name for printers (transaction SPAD /utilities/for output device /Assign server)

      => Check job engine (SM61, check with SM65)

      => Request a new license (for windows system)

      => Release suspended jobs (BTCTRNS2)

      => Update TMS configuration from domain controller

      Reference :

      8307 - Changing host name on R/3 host: What do you do?

      For Java stack have a look on these notes

      1275273 - Hostname change on 7.10/7.11 java stacks

      757692 - Changing the hostname for J2EE Engine 6.40/7.0 installation

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      I will add these details also

      Thanks for mentioning the missing steps

      Author's profile photo Former Member
      Former Member

      Nice document for changing the hostnames in wondows environment.

      Author's profile photo Former Member
      Former Member

      Hello Jawad

      Oh my lord, I was about to write a post on SCN about it and luckily I come down to on your doc.

      It not only increased my knowledge even trick too. It is very informative and supportive doc.

      Keep it up. We all looking forward your next doc, Thanks for sharring.

      Arshiyan

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Arshiyan 🙂 will be posting a new article soon 🙂

      Author's profile photo Mukesh Khamparia
      Mukesh Khamparia

      Excellent Muhammad. It is good to see all the steps with screens.

      Lets have a document for DB host name change only 🙂

      Thanks

      Mukesh Khamparia

      http://scn.sap.com/community/about/blog/2013/09/04/contribute-in-scn

      Author's profile photo shyam kumar
      shyam kumar

      Hi,

      Thanks a lot for sharing such valuable info.. 🙂

      Regards,

      Shyam Kumar

      Author's profile photo Former Member
      Former Member

      Hi.

      Thanks. It's great!

      Regards.

      Juseok Lee

      Author's profile photo Unmudi Mj
      Unmudi Mj

      Hi,

      Thanks for sharing 🙂

      Mj