Creating camunda tables in different databases on the same server

I have two databases in my localhost mysql server: db1, db2 (both are empty)
I started up my application with the following jdbcUrl=jdbc:mysql://localhost:3306/db1 and the application started up and all the Camunda tables were created properly.
I then shut down the application and tried running it with the second db: jdbcUrl=jdbc:mysql://localhost:3306/db2 and received the following error:

Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table 'db2.ACT_GE_PROPERTY' doesn't exist
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'db2.ACT_GE_PROPERTY' doesn't exist

I searched for similar issues and saw some comments on how Camunda was unable to create tables on a different schema.
I then deleted the Camunda tables from db1 and tried again to run the application on db2 and then indeed the application started up successfully and the Camunda tables were created on db2.

  1. Is it correct to say that Camunda does not support the creation of tables if the tables already exist in another db on the same server?
  2. If #1 is correct, then is there a way to work around this, like a setting perhaps which can always force the creation of the tables.

Thank you!

this is not the case. I can’t think of a reason why this is happening can you give some more details about your engine settings and how exactly your configuring the engine and data sources.

even i had faced with similar issue on oracle database,

I had installed camunda using let’s say with schema1 on a DB instance, and when i tried to install camunda with a different database schema on the same instance, then I got the error, table act_ge_property does not exist. then I dropped the first instance and then installation with the second DB instance went smoothly.

if you let me know, i can provide more details what you need @Niall

Hi @Moiz

Thanks so much for sharing, i’d be very interested i your insights, please feel free to share you experience.

Hi @c_schon and @Moiz,

I think the schema generation is done here: camunda-bpm-platform/ at master · camunda/camunda-bpm-platform · GitHub

maybe a close look into the ifs around persistenceSession.dbSchemaCreate(); provides more insight.

Hope this helps, Ingo

Is it possible to externalize the schema validation using engine properties so that if schema is already created in another database, we can re-use it/force fully to create new schema.

Hi @cpbpm,

I don’t know if helps with your specific requirement, but startung with Camunda Platform 7.16, Liquibase is supported: Install the Database Schema |

Hope this helps, Ingo