My personal practical experience:
Case #1
dbt ran 17 hours
Database_Transfer.log.0 18 Mbyte
Case #2
dbt ran 16 hours
Database_Transfer.log.0 16 Mbyte
Case #3
dbt ran 24 hours
Database_Transfer.log.0 21 Mbyte
I recommend you to plan 24 hours for HOMEPAGE migration with dbt tool. You do not need to tail log file. It is very boring. You may see hundreds of thousands rows like these:
[07/04/19 03:55:36.235 CEST] doing the check invalid pk for where clause for column: DOCUMENT
[07/04/19 03:55:36.235 CEST] PKs: [DOCUMENT_ID]
I recommend you to start process, wait 20 minutes and check status. In case of error the process usually stops in 20 minutes with error messages.
In case of errors:
- Check homepage.xml (if you use the same name)
- URLs
- username and password
- dbType
- Be very careful with source and target
- you should increment Xms and Xmx *if you do not use these parameters process can fail after 8 - 12 hours
- run db2 update cfg for HOMEPAGE
driver="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://1.1.1.1:50000/HOMEPAGE"
userId="LCUSER"
schema="HOMEPAGE"
dbType="DB2"/>
driver="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://2.2.2.2:50000/HOMEPAGE"
userId="db2inst1"
schema="HOMEPAGE"
dbType="DB2"/>
Here you are an example to run dbt (migrateHomepage.sh):
run the tool as db2 user, for example: db2inst
export DBT_HOME=/opt/ibm/install/dbt
export JAVA_HOME=/opt/ibm/install/conns6wiz/Wizards/jvm/linux/jre
export PATH=$PATH:/opt/ibm/install/conns6wiz/Wizards/jvm/linux/jre
export DB2_HOME=/opt/ibm/install
sleep 5
echo "db2stop force and sleep 10"
db2stop force
sleep 10
echo
echo "db2start and sleep 10"
db2start
echo "update db cfg for HOMEPAGE using APPLHEAPSZ automatic APPL_MEMORY automatic SELF_TUNING_MEM ON - and sleep 10"
sleep 10
echo
db2 "update db cfg for HOMEPAGE using APPLHEAPSZ automatic APPL_MEMORY automatic SELF_TUNING_MEM ON"
sleep 10
echo "run dbt"
echo
$JAVA_HOME/bin/java -Xms4096m -Xmx4096m -cp $DBT_HOME/dbt.jar:$DB2_HOME/febjava/db2jcc4.jar com.ibm.wps.config.db.transfer.CmdLineTransfer -logDir $DBT_HOME/logs -xmlfile $DBT_HOME/homepage.xml -sourcepassword 123456789 -targetpassword 987654321
echo
sleep 10
echo
echo "db2stop force at the end of the process"
db2stop force
echo
sleep 10
echo
echo "db2start at the end of the process"
db2start
At the end of the log file you should see something like this:
[07/04/19 09:41:54.222 CEST] Population of NR_FOLLOWS (31042 rows) completed successfully
[07/04/19 09:41:54.222 CEST] Processing table -{ SR_GLOBAL_SAND_PROPS->SR_GLOBAL_SAND_PROPS }-
[07/04/19 09:41:54.222 CEST] SELECT * FROM "HOMEPAGE"."SR_GLOBAL_SAND_PROPS"
[07/04/19 09:41:54.445 CEST] INSERT INTO "HOMEPAGE"."SR_GLOBAL_SAND_PROPS" ("GSP_ID","GSP_NAME","GSP_VALUE","GSP_TYPE") VALUES( ?, ?, ?, ? )
[07/04/19 09:41:54.446 CEST] Transferring table --{ HOMEPAGE.SR_GLOBAL_SAND_PROPS}-- to table --{HOMEPAGE.SR_GLOBAL_SAND_PROPS }--
[07/04/19 09:41:54.525 CEST] Population of SR_GLOBAL_SAND_PROPS (0 rows) completed successfully
[07/04/19 09:41:54.525 CEST] Transfer finished
During the process you have Database_Transfer.log.0.lock or similar with lock at the end. If it exists the process is still running.