Sql server Liquibase generateChangeLog引发异常:SQLServerException:无法解决。。。在交叉操作中

Sql server Liquibase generateChangeLog引发异常:SQLServerException:无法解决。。。在交叉操作中,sql-server,liquibase,Sql Server,Liquibase,我正在学习Liquibase的教程。当我跑步时: liquibase --changeLogFile=dbchangelog.xml --logLevel=info generateChangeLog 命令以错误结束,请参见下面的完整stacktrace: SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the

我正在学习Liquibase的教程。当我跑步时:

liquibase --changeLogFile=dbchangelog.xml --logLevel=info generateChangeLog
命令以错误结束,请参见下面的完整stacktrace:

SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
我错过了什么?我正在使用最新的Liquibase版本3.8.7

完整堆栈跟踪:

16:13:50.205 ERROR [liquibase.integration.commandline.Main]: Unexpected error running Liquibase: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
        at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:289)
        at liquibase.integration.commandline.Main.doMigration(Main.java:1412)
        at liquibase.integration.commandline.Main.run(Main.java:303)
        at liquibase.integration.commandline.Main.main(Main.java:163)
Caused by: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
        at liquibase.command.AbstractCommand.execute(AbstractCommand.java:24)
        at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:287)
        ... 3 common frames omitted
Caused by: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
        at liquibase.snapshot.jvm.SchemaSnapshotGenerator.snapshotObject(SchemaSnapshotGenerator.java:97)
        at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66)
        at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
        at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
        at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
        at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
        at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
        at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
        at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
        at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:316)
        at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:107)
        at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:60)
        at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:39)
        at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:217)
        at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:190)
        at liquibase.command.core.DiffCommand.createReferenceSnapshot(DiffCommand.java:229)
        at liquibase.command.core.DiffCommand.createDiffResult(DiffCommand.java:151)
        at liquibase.command.core.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:60)
        at liquibase.command.AbstractCommand.execute(AbstractCommand.java:19)
        ... 4 common frames omitted
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_BIN" in the INTERSECT operation.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:775)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQueryInternal(SQLServerStatement.java:619)
        at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetFromInternalQueries(SQLServerDatabaseMetaData.java:224)
        at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getSchemasInternal(SQLServerDatabaseMetaData.java:1292)
        at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getSchemas(SQLServerDatabaseMetaData.java:1227)
        at liquibase.snapshot.jvm.SchemaSnapshotGenerator.getDatabaseSchemaNames(SchemaSnapshotGenerator.java:130)
        at liquibase.snapshot.jvm.SchemaSnapshotGenerator.snapshotObject(SchemaSnapshotGenerator.java:63)
        ... 22 common frames omitted

我通过下载最新的SQL server驱动程序,特别是8.2版,解决了这个问题。原来我使用的是一个非常过时的驱动程序,其中包含了所描述的错误。该bug与驱动程序的getSchemas方法有关,该方法在generateChangeLog命令期间分解调用,如stacktrace中所示

错误消息表示查询中存在不同且冲突的列排序规则。我猜数据库和实例的排序规则是不同的,希伯来语是BIN,SQL拉丁语是General,CP1是CI,这可能会导致一些工具和查询出现问题,而这些工具和查询没有编码来处理不同的排序规则。我对liquidbase一无所知,我不能说这个问题是否可以通过liquidbase配置解决,或者这是一个没有解决方法的工具的问题。