# Including db and schema name before databasechangelogtable

**URL:** <https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819>\
**Category:** General Discussion\
**Tags:** snowflake\
**Created:** [November 19, 2020, 1:39pm UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819 "2020-11-19T13:39:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![murali](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@murali](https://forum.liquibase.org/u/murali)\
**Post date:** [November 19, 2020, 1:39pm UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819/1 "2020-11-19T13:39:03Z")

</div>

Need help to setup liquibase for snowflake ,I am wondering if there is a way to include database and schema names with databasechangelog and lock table, This is needed because we have views/ procedures need to be created across multiple databases but databasechangelog table must be in specific schema and db.

I tried to change in liquibase.properties  
databaseChangeLogTableName: db1.schema.masterlog  
databaseChangeLogLockTableName: db1.schema.masterloglock

then liquibase adding quotes around insert into “db1.schema.masterlog” , either i should have statement like “db1”.“schema”.“masterlog” or without quotes db1.schema.masterlog.

tried with these in properties , but liquibaseSchemaName only working, catalog name is not including  
liquibaseCatalogName:db1  
liquibaseSchemaName:schema

Please suggest.  
@nvoxland @r2liquibase

---

<div class="post-metadata">

**Author:** ![costinmoraru](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@costinmoraru](https://forum.liquibase.org/u/costinmoraru)\
**Post date:** [November 22, 2020, 4:50pm UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819/2 "2020-11-22T16:50:36Z")

</div>

Hi @murali,  
I had to deal with snowflake some time ago, if you give me a few days I will try the solution I had found again. You also need to setup snowflake.

---

<div class="post-metadata">

**Author:** ![murali](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@murali](https://forum.liquibase.org/u/murali)\
**Post date:** [November 23, 2020, 8:53am UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819/3 "2020-11-23T08:53:00Z")

</div>

sure, good to know if there is work around.

---

<div class="post-metadata">

**Author:** ![ANDRII](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@ANDRII](https://forum.liquibase.org/u/ANDRII)\
**Post date:** [November 25, 2020, 7:17pm UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819/4 "2020-11-25T19:17:43Z")

</div>

I also interesting in this because Snowflake switches schemas after schema creation which leads to immediate fail of Liquibase script - it stops see the schema which holds databasechnagelog tables.

---

<div class="post-metadata">

**Author:** ![costinmoraru](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@costinmoraru](https://forum.liquibase.org/u/costinmoraru)\
**Post date:** [November 30, 2020, 11:26pm UTC](https://forum.liquibase.org/t/including-db-and-schema-name-before-databasechangelogtable/4819/5 "2020-11-30T23:26:50Z")

</div>

Hi @murali,  
sorry for the delay response. i tried to investigate about this, and i didn’t found a simple solution.  
Refering to this:

> **[Query Multiple Databases Within Snowflake](https://resources.snowflake.com/youtube-all-videos/query-multiple-databases-within-snowflake)**
>
> With traditional data warehouses, it's impossible to query two databases within the same warehouse. Snowflakes unique architecture logically integrates every database within the same account, enabling

  
i think it is possible to implement this.  
But, in this period i don’t have too much time because i working on multiple task at the same time.

Try this because i didn’t had any issue to create liquibase tables in a specific db -\> schema:

- use jdbc:snowflake://\<account\_name\>.snowflakecomputing.com/?\<connection\_params\> without the db.
- for liquibase databasechangelog and lock table use “dbname”.“schema\_name”.“table\_name”
- the same for changesets “dbname”.“schema\_name”.“table\_name”

And make sure you have added the extension [https://github.com/liquibase/liquibase-snowflake](https://github.com/liquibase/liquibase-snowflake)
