The H2 database driver is upgraded to version 2.1.210, following CVE
issues. The database built by driver version 1.4.196/1.4.200 is not
compatible with version 2.1.210. To upgrade the database, you need to backup the database with the old H2 driver and restore this backup on the new driver.
Procedure
-
Prepare the database drivers:
- The old one (h2-1.4.196.jar/h2-1.4.200.jar).
- The new one (h2-2.1.210.jar).
-
Backup the database using the Script tool:
// use the h2-1.4.196.jar/h2-1.4.200.jar to backup the current h2 db:talend_administrator to file: tac_backup.zip
java -cp .\h2-1.4.200.jar org.h2.tools.Script -url
"jdbc:h2:file:D:/Tomcats/tacdb/migrate/talend_administrator;MV_STORE=FALSE;AUTO_SERVER=TRUE;lock_timeout=15000;DEFAULT_LOCK_TIMEOUT=15000;LOCK_MODE=0"
-user tisadmin -password tisadmin -script tac_backup.zip -options compression zip
-
Restore the backup to the new database using the RunScript
tool:
// use the h2-2.1.210.jar to restore the backup file: tac_backup.zip to new db: talend_administrator_new
java -cp .\h2-2.1.210.jar org.h2.tools.RunScript -url
"jdbc:h2:file:D:/Tomcats/tacdb/migrate/talend_administrator_new;AUTO_SERVER=TRUE;lock_timeout=15000;DEFAULT_LOCK_TIMEOUT=15000;LOCK_MODE=0;MODE=LEGACY"
-user tisadmin -password tisadmin -script tac_backup.zip -options compression zip
-
Update the talend_administrator_new.mv.db file name to talend_administrator.mv.db.
Talend Administration Center
will use this new file which works with the 2.1.210 driver.
Also update
<ApplicationPath>/WEB-INF/classes/configuration.properties
file with the correct JDBC URL:
jdbc:h2:{0}/WEB-INF/database/talend_administrator;AUTO_SERVER=TRUE;lock_timeout=15000;DEFAULT_LOCK_TIMEOUT=15000;LOCK_MODE=0;MODE=LEGACY