I have a file liquibase.properties with below contents
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
classpath: ./sqljdbc4-2.0.jar
url: jdbc:sqlserver://localhost:1433;databaseName=staticDB
username: sa
password: admin@123
changeLogFile: myChangeLog.xml
I am using the command liquibase update and by this the database changes are getting deployed on staticDB database
I want to pass a dynamic database name along with the liquibase update command so that I can deploy the database changes on multiple database
I have change the url:
in properties file like below
url: jdbc:sqlserver://localhost:1433;databaseName=${database}
I have tried using command like
liquibase update -Ddatabase="Liquibase_Param"
But I am not able to execute the liquibase command correctly as I am getting below error
Unexpected error running Liquibase: com.microsoft.sqlserver.jdbc.SQLServerException: The connection string contains a badly formed name or value.
Please let me know How can I pass dynamic database name while running liquibase update command