Understanding the Java Instance ID issue
First of all, let’s understand how a Java ID is generated.
Each SAP system Java contains the so-called box number, which is composed by 3 values: <SID> + <Instance Number> + <Hostname>. The Java ID is then generated from the box number. For sakes of demonstration, let S01 and S02 be two SAP systems as follows:
|Calculated Java ID||ID184962||ID224865|
The table above shows the information of each system and the ID they generated, which is stored at database level. Currently, each system should be working just fine.
If by any chance one decides to copy the database from S01 and restore it over S02 system (which by the way is not supported), what will happen is the following:
|Calculated Java ID||ID184962||ID184962|
The Java ID of S01 is now in the DB of system S02. Then, the box number of S02 no longer matches its Java ID, causing an inconsistency.
The same would happen if any of the parameters of the box numbers were changed in an unsupported way. Then, the ID would still be the same, but the box number and ID would no longer match.
Some tools, such as SWPM (during system copies) and SUM check if the Java ID is consistent with the box number. If it is not, the tools stop the procedure with an error. Currently, the only available solution to fix that is to perform a system copy of the system that is inconsistent. However, as already mentioned, SWPM checks the consistency of the IDs and it will fail. Therefore, to overcome this, one must:
- Start the system copy with SWPM;
- After the export of the Central Instance, edit file SOURCE.PROPERTIES located in the export directory;
- The source parameters must be adjusted to the ones that generated the current ID located in the Database. In this case, after the export, the following content will be present in SOURCE.PROPERTIES file:
- However, as per the first table, the above information generates ID224865, which no longer exists in the DB. So, one must adapt it to:
- After that, the installation of the target system can be started. During the target CI installation, Java Migration Toolkit will be executed to correctly adjust the IDs of the Java system. It will migrate the current one (ID184962), to the correct ID that matches the box number of the target system. This box number is composed by the values provided to SWPM during the target system installation.
The consistency check of the Java ID with the box number can be done by following the steps from SAP Note 1711300, see the entry from C5061069 Sep/20/2011. Even though this note is focused for DB2 for i, the consistency check procedure is independent of database.
In case of any issues, a Support Incident should be created under BC-INS-MIG component.