SAP Java – changing instance name after refreshing the system with production data

In the following scenario, we’ll focus on changing the instance name (SID). The data of the SAP Java test instance will be replaced with data from the production system. The database refresh process itself will be the subject of a separate article.

At this moment, we will focus on the steps that should be taken after such a refresh of the database, on the server where we have the JAVA instance running. Let’s assume that:

  • test Java instance name is “TST”, host: test01, instance numbers: J47 and SCS46;
  • the name of the production JAVA instance is “PRD”, host: prod01, instance numbers J47 and SCS46;
  • before refreshing, the TST system was embedded on NetWeaver 7.4, while the production system was already in NetWeaver 7.5;
  • the TST instance has been overwritten with data from the PRD system.

Steps to follow for the above scenario:

  1. On the host test01 we should backup the directories: /usr/sap/TST oraz /sapmnt/TST.
  2. After completing step one, we should delete the contents of the directories: /usr/sap/TST oraz /sapmnt/TST.
  3. Now, we should log in to the host: prod01 and synchronize the /usr/sap/TST and /sapmnt/TST directories with the test01 host:
    • rsync -rcavz –progress /sapmnt/PRD/* tstadm@test01:/sapmnt/TST/
    • rsync -rcavz –progress /usr/sap/PRD/* tstadm@test01:/usr/sap/TST/
  4. After the above synchronization, we now have to change the following files:
    1. We have to edit the indicated files and replace the SIDs from PRD to TST in them: /usr/sap/TST/J47/j2ee/configtool/ and /usr/sap/TST/J47/j2ee/configtool/
    2. After completing the first step, we can now run the tool: and make changes in the Secure Store:
    3. Make new symbolic links, which will be point to the right place in the below locations: /usr/sap/TST/SYS and /usr/sap/TST/SYS/exe.
    4. Replace the SID from PRD to TST in the file: /sapmnt/TST/global/security/data/
    5. In the location: /sapmnt/TST/profile, the profiles should be replaced with the correct names (i.e. TST_J47_test01 and TST_SCS46_test01). We change the name of the installation from PRD to TST in these profiles + DEFAULT.PFL. We also have to change the host: from prod01 to test01.
    6. We set the appropriate server for the database in the tnsnames.ora file: /sapmnt/TST/profile/oracle/tnsnames.ora
    7. Before we start the TST instance, it would be good to do the following:
      • clear trace directory: /usr/sap/TST/J47/work;
      • kill all active processes which still are running on tstadm user;
      • delete all .sapstream * files in the /tmp location owned by the tstadm user

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2024. Privacy Policy