Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
gangothri
Associate
Associate
798

Running Table checker after SWPM Export and Import:

The Table Checker is used to verify if the number of rows been exported is the same as the number of rows in the database (not usable in Socket mode). This tool can be used to verify that any table’s row count during export matches with that table’s row count after import. The comparison is done with the information of the <PACKAGE>.TOC files against the record count in the database. The table checker is run after the import using a connection to the target database. In detail, the tool uses the table of content (TOC) files that hold information on the number of rows exported for each individual table and about the physical location of the table content inside the dump file. A known limitation is, that tables, which were declustered cannot be checked by table checker. If a difference is found, these table are logged in the invalid_tables.txt file. Only tables with errors will be logged. Tablechecker can be executed before starting the SAP Application after export and import.

Pre-requisites:

  • JRE version 1.4.1 or higher
  • JAVA_HOME environment variable must point to the JRE directory.
  • The database must be running to establish a JDBC connection.
  • For non-Oracle databases, the JDBC driver class name / JDBC URL should be known.
  • The JDBC_JAR environment variable must point to the jar file with the JDBC driver. E.g. : <ORACLE_HOME>/jdbc/lib/classes12.jar for Oracle.

The tablechecker script is located in the MIGCHECK.SAR archive. After extracting the SWPM SAR file, MIGCHECK.SAR file is available under /SWPM/COMMON/INSTALL/ directory.

Below steps were followed during import to execute tablechecker script for Oracle to HANA migration using SWPM R3load export and import method. The import was performed on RISE.

  1. Access CI application server where SWPM is launched
  2. Switch to <sidadm> user
  3. Run commands : setenv JAVA_HOME /usr/lib64/jvm/java-1.8.0-ibm-1.8.0/jre/ and setenv JDBC_JAR  /sapmnt/<SID>/exe/uc/linuxx86_64/hdbclient/ngdbc.jar
  4. Extract MIGCHECK.SAR archive to separate directory
  5. Switch to directory where MIGCHECK.SAR was extracted to
  6. Run table_checker.sh script as below

./table_checker.sh -unicode -tocDirs <export directory/ABAP/DATA> -user <schemauser> -password ******* -driver com.sap.db.jdbc.Driver -url jdbc:sap://<dbhostname>:3<hanadbinstancenumber>41 –trace all

gangothri_0-1765208937424.png

 

Output of the command should list all tables that have different export and import row counts.

Running import and export time analyzer scripts:

The Time Analyzer tool is used to analyze unload/load times for packages and individual tables.

Pre-requisites:

  • JRE version 1.4.1 or higher
  • JAVA_HOME environment variable must point to the JRE directory.

The tool is located in the MIGTIME.SAR archive. After extracting the SWPM SAR file, MIGTIME.SAR archive is available under /SWPM/COMMON/INSTALL/ directory.

Below steps were followed during import to execute import_time.sh script for Oracle to HANA migration using SWPM R3load export and import method. The import was performed on RISE.

  1. Access CI application server where SWPM is launched
  2. Switch to <sidadm> user
  3.  Run commands : setenv JAVA_HOME /usr/lib64/jvm/java-1.8.0-ibm-1.8.0/jre/ and setenv JDBC_JAR  /sapmnt/<SID>/exe/uc/linuxx86_64/hdbclient/ngdbc.jar
  4. Extract MIGTIME.SAR archive to separate directory
  5. Switch to directory where MIGTIME.SAR was extracted to
  6. Run import_time.sh script as below

./import_time.sh -installDir <sapinst log directory> -dataDirs <path to export directory/ABAP/DATA -h 1 -txt -h -xml -html

gangothri_0-1765208481569.png

The output of command can be seen in import_time.html file

Similar steps can be executed to get export time of packages  using export_time.sh script