Hello, I got an error deploying my app to a production server in 2 instances due to DB changes sync issues. Unfortunately, this is quite normal and I have been able to handle it well. It’s fairly easy to spot what’s wrong comparing the changes I made in the Domain Model, the DB tables and update them accordingly and deployment log. However, this time I got an error that I can’t spot its cause (check log in the end of the message). The table doesn’t exist but neither does a record of its entity in MendixSystem$Entity or a record of the index in MendixSystem$Indexes or MendixSystem$Associations (I believe those should be the tables Mendix uses to make the comparison between versions?). I’m using version 7.13.1, with no possibility to upgrade. The DB data can’t be deleted as it holds important data. Does anyone know what I might be missing? Thanks. ERROR - M2EE: com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:117) Caused by: com.mendix.basis.connectionbus.ConnectionBusException: Error (SQL State: 42S02, Error Code: 1146) on executing: DROP INDEX `Index_system$owner` ON `Table` All changes are rolled back. at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:77) Caused by: java.sql.SQLSyntaxErrorException: (conn:14453105) Table 'Table' doesn't exist Query is : DROP INDEX `Index_system$owner` ON `Table` at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:139) at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101) at org.mariadb.jdbc.internal.util.ExceptionMapper.throwAndLogException(ExceptionMapper.java:77) at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:226) at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:256) at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:302) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) ERROR: Executing execute_ddl_commands did not succeed: result: 1, message: Executing DDL commands failed., caused by: Error (SQL State: 42S02, Error Code: 1146) on executing: DROP INDEX `Index_system$owner` ON `Table`
Although you say that it is quite normal, I disagree: one of the advantages of using Mendix is that you do not need to manually configure your database. Since this requires no developer interaction, if anything goes wrong, it's on Mendix to fix it, and therefore, I would submit a support ticket.
Rom van Arendonk
This is caused by security on the DB which your app is trying to connect to. Because Mendix executes changes to the DB when the app starts up, it needs to execute DDL commands which some SQL devs will disable on a Production DB.
you need to ensure the user which is trying to alter the DB ( Im assuming this is an on premise app?) has rights to run these commands