Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY

Qlik Talend Administration Center: could not execute statement database schema migration failed when migrating TAC database

100% helpful (4/4)
cancel
Showing results for 
Search instead for 
Did you mean: 
Chethankumar_JS
Support

Qlik Talend Administration Center: could not execute statement database schema migration failed when migrating TAC database

Last Update:

Sep 20, 2024 3:20:08 AM

Updated By:

Shicong_Hong

Created date:

Sep 19, 2024 11:30:30 PM

While migrating the TAC database from one to another in the Talend Administration Center using the Metaservlet API (Given example is when migrating the database from H2 to Postgres SQL), you may encounter the following issue:

{error":"Migration failed, please see migraion logs for more details.","returnCode":1}

Upon reviewing the migration logs, noticed the following error.

Can't create Quartz tables: org.hibernate.exception.SQLGrammarException: could not execute statement
database schema migration failed.
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
   at org.talend.migration.quartz.QuartzMigrationUtils.<init>(QuartzMigrationUtils.java:79)
   at org.talend.migration.TalendMigrationApplication.call(TalendMigrationApplication.java:320)
   at  org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103)
   org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:10)
   at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1509)
   at 
Caused by: org.postgresql.util.PSQLException: ERROR: relation "qrtz_job_details" already exists
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
   

 

Cause

  • Improper execution of the migration scripts.
  • When the destination database is not empty or freshly initialized.
  • Multiple executions of the migration Scripts: - If you've run the same migration script more than once, it might attempt to create the table again.
Note: Quartz can store Job and scheduling information in a relational database and quartz can automatically create tables with initialize-schema

 

Resolution

Verify the list of database tables and rename or drop any tables that contain the prefix "qrtz" in their names.

 

Related Content 

Migrating database X to database Y

What does each table for quartz scheduler signify?

 

Environment