# JDBC URL Command line with database and set default schema

**URL:** <https://forum.liquibase.org/t/jdbc-url-command-line-with-database-and-set-default-schema/8325>\
**Category:** General Discussion\
**Created:** [June 8, 2023, 6:07am UTC](https://forum.liquibase.org/t/jdbc-url-command-line-with-database-and-set-default-schema/8325 "2023-06-08T06:07:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asmita](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Asmita](https://forum.liquibase.org/u/Asmita)\
**Post date:** [June 8, 2023, 6:07am UTC](https://forum.liquibase.org/t/jdbc-url-command-line-with-database-and-set-default-schema/8325/1 "2023-06-08T06:07:11Z")

</div>

Help -

Hi Team,  
Could you please help us me to understand how to pass the JDBC URL from command line with database?

I am trying to have dynamic url. Is it possible to have multiple environment wise liquibase.properties. files?

Also, how to set default schema in properties file or using command prompt? I need to remove the table\_schema from below query/

–preconditions onFail:MARK\_RAN onError:HALT  
–precondition-sql-check expectedResult:0 SELECT COUNT(\*) FROM information\_schema.tables WHERE table\_name = ‘configuration’ AND table\_schema = ‘flywaymigration’;

---

<div class="post-metadata">

**Author:** ![PJatLiquibase](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@PJatLiquibase](https://forum.liquibase.org/u/PJatLiquibase)\
**Post date:** [June 8, 2023, 2:47pm UTC](https://forum.liquibase.org/t/jdbc-url-command-line-with-database-and-set-default-schema/8325/2 "2023-06-08T14:47:36Z")

</div>

Hi @Asmita,

There are few ways to work the a dynamic URL.

1. You could use the `--url` command line parameter. See docs here → [https://docs.liquibase.com/parameters/home.html](https://docs.liquibase.com/parameters/home.html)
2. You set the URL as an environment variable. See docs here → [https://docs.liquibase.com/concepts/connections/liquibase-environment-variables.html](https://docs.liquibase.com/concepts/connections/liquibase-environment-variables.html)
3. You could have per-environment liquibase properties files, e.g. `liquibase.dev.properties` and `liquibase.ci.properties` and `liquibase.prod.properties`

For the second part of your question:

You can use changelog properties to substitute text in your changelog, such as the table\_schema.  
You can manually set up any properties you want, but Liquibase also creates a property named ${database.defaultSchemaName} that you can reference.

For example:  
`–precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.tables WHERE table_name = ‘configuration’ AND table_schema = ‘${database.defaultSchemaName}’;`

I hope that helps.

`-PJ`
