# Setting database schema name

**URL:** <https://forum.flowable.org/t/setting-database-schema-name/9168>\
**Category:** Flowable Engine\
**Created:** [April 4, 2022, 10:08pm UTC](https://forum.flowable.org/t/setting-database-schema-name/9168 "2022-04-04T22:08:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yasermalik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yasermalik/32/2778_2.png) [@yasermalik](https://forum.flowable.org/u/yasermalik)\
**Post date:** [April 4, 2022, 10:08pm UTC](https://forum.flowable.org/t/setting-database-schema-name/9168/1 "2022-04-04T22:08:02Z")

</div>

I have a separate schema for storing Flowable tables which I create manually in all environments. My spring-boot app needs to connect to this database using an application user which has read, write and delete privileges. My DBA does not like applications connecting to the database with Schema Owner users. I am adding all the grants to all the tables for this APPLICATION\_USER however my spring-boot app fails on startup as it cannot find the table. After some debugging I found out the issue is because I am not prefixing the schema to use. Is there a way to tell flowable engine to prefix all the queries with a schema name which might be different than the datasource creds we are using to connect to the database?

select \* from ACT\_GE\_PROPERTY; → does not work  
select \* from FLOWABLE\_SCHEMA.ACT\_GE\_PROPERTY; → Works

---

<div class="post-metadata">

**Author:** ![yasermalik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yasermalik/32/2778_2.png) [@yasermalik](https://forum.flowable.org/u/yasermalik)\
**Post date:** [April 5, 2022, 7:45pm UTC](https://forum.flowable.org/t/setting-database-schema-name/9168/2 "2022-04-05T19:45:53Z")

</div>

I have tried adding a schema.sql which runs on startup and setting the current schema to be the schema owner, the application starts up and I see all the sql queries are being prefixed with schema\_owner.table\_name correctly. The queries in TimerJob.xml though are not getting prefixed though and I see table not found errors. I am not sure why these are behaving differently to other queries.

---

<div class="post-metadata">

**Author:** ![yasermalik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yasermalik/32/2778_2.png) [@yasermalik](https://forum.flowable.org/u/yasermalik)\
**Post date:** [April 5, 2022, 8:15pm UTC](https://forum.flowable.org/t/setting-database-schema-name/9168/3 "2022-04-05T20:15:16Z")

</div>

I see there is a field in “DbSqlSession” class called “connectionMetadataDefaultSchema” which seems to be what we need to set, I am having trouble finding where this can be set.

---

<div class="post-metadata">

**Author:** ![yasermalik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yasermalik/32/2778_2.png) [@yasermalik](https://forum.flowable.org/u/yasermalik)\
**Post date:** [April 5, 2022, 9:25pm UTC](https://forum.flowable.org/t/setting-database-schema-name/9168/4 "2022-04-05T21:25:39Z")

</div>

There are a couple of properties that you need to set.  
flowable.database-schema  
flowable.database-schema-update
