Home:ALL Converter>Generate liquibase changelog from SQL Server

Generate liquibase changelog from SQL Server

Ask Time:2018-08-08T18:05:27         Author:Mad Scientist

Json Formatter

I have a SQL Server database and want to generate a liquibase changelog via command line like this:

.\liquibase `
--driver=com.microsoft.sqlserver.jdbc.SQLServerDriver `
--classpath=C:\Users/Ferid/Downloads/MicrosoftJDBCDriver6.0forSQLServer/sqljdbc_6.0/deu/jre8/sqljdbc42.jar `
--changeLogFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\sdk\workspace\changelog\com\example\newChangelogMSSQLX.xml" `
--url="jdbc:sqlserver://ferdects.database.windows.net:1433;db8" `
--username=username `
--password=password `
generateChangeLog

but when I execute it this error occurs:

Unexpected error running Liquibase: Unexpected value db8: parameters must start with a '--'

SEVERE 8/8/18 11:54 AM: liquibase: Unexpected value db8: parameters must start with a '--'
liquibase.exception.CommandLineParsingException: Unexpected value db8: parameters must start with a '--'
    at liquibase.integration.commandline.Main.parseOptions(Main.java:774)
    at liquibase.integration.commandline.Main.run(Main.java:133)
    at liquibase.integration.commandline.Main.main(Main.java:103)

I have tried several syntaxes for the url but none of them did work. My database's name is db8 and I am using SQL Server 2017 and liquibase-3.5.5.

Author:Mad Scientist,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51743952/generate-liquibase-changelog-from-sql-server
SteveDonie :

I think your URL should be\n\n--url=\"jdbc:sqlserver://ferdects.database.windows.net:1433;databaseName=db8\"",
2018-08-08T15:50:40
yy