Wednesday, 4 September 2019

SAP HANA Post Migration Error: ImportError: No module named DBMigrationTool.migrator.Config

Tags


Issue:

Error in SAP HANA 1.0 and 2.0.

The following error is received when executing python migrateSystem.py --postMigration

python migrateSystem.py --configFile= /usr/sap/XXX/SYS/exe/hdb/global/hdb/DBMigrationTool/migration.properties --postMigration
Traceback (most recent call last):
File "migrateSystem.py", line 6, in
from DBMigrationTool.migrator.Config import Configuration
ImportError: No module named DBMigrationTool.migrator.Config




Reproducing the Issue
python migrateSystem.py --configFile= /usr/sap/XXX/SYS/exe/hdb/global/hdb/DBMigrationTool/migration.properties --postMigration
Traceback (most recent call last):
File "migrateSystem.py", line 6, in
from DBMigrationTool.migrator.Config import Configuration
ImportError: No module named DBMigrationTool.migrator.Config



Extract the migration tool and got following error.

The migration tool is delivered with HANA 2.0, but only in compressed form. You need to extract it manually. As the adm of the target system, Log in as adm into the target system and run the following commands, ensure the directory "DBMigrationTool" is in the python path:

cd $DIR_SYSEXE/global/hdb/
tar -xzf dbEndiannessMigration.tgz
export PYTHONPATH=$DIR_SYSEXE/global/hdb/:$PYTHONPATH


Solution:

Execute the below commands as sidadm user:

cd $DIR_SYSEXE/global/hdb/
tar -xzf dbEndiannessMigration.tgz
export PYTHONPATH=$DIR_SYSEXE/global/hdb/:$PYTHONPATH




EmoticonEmoticon

Note: only a member of this blog may post a comment.