Hi ,
I am using liquibase 3.4.1 but I got one issue regarding database ,
my database name is combination of small & capital letters.
While running liquibase update it is showing unknown database error
. It converts all letters into small case. We are using
mysql database server.
Following is the error log
DEBUG 26/11/15 3:08 PM: liquibase: Release Database Lock
DEBUG 26/11/15 3:08 PM: liquibase: Executing UPDATE database
command: UPDATE myTestDB.DATABASECHANGELOGLOCK SET LOCKED = 0,
LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
INFO 26/11/15 3:08 PM: liquibase: Successfully released change
log lock
Unexpected error running Liquibase: java.sql.SQLException:
Unknown database 'mytestdb'
SEVERE 26/11/15 3:08 PM: liquibase: java.sql.SQLException:
Unknown database 'mytestdb'
liquibase.exception.UnexpectedLiquibaseException:
liquibase.exception.DatabaseException: java.sql.SQLException:
Unknown database 'mytestdb'
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:102)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1074)
at liquibase.Liquibase.update(Liquibase.java:203)
at liquibase.Liquibase.update(Liquibase.java:190)
at liquibase.integration.commandline.Main.doMigration(Main.java:1096)
at liquibase.integration.commandline.Main.run(Main.java:180)
at liquibase.integration.commandline.Main.main(Main.java:99)
Caused by: liquibase.exception.DatabaseException:
java.sql.SQLException: Unknown database 'mytestdb'
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:78)
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getTables(JdbcDatabaseSnapshot.java:343)
at liquibase.snapshot.jvm.TableSnapshotGenerator.snapshotObject(TableSnapshotGenerator.java:32)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:60)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:63)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:194)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:70)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:44)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:21)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:150)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:158)
at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:165)
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:100)
... 6 more
Caused by: java.sql.SQLException: Unknown database 'mytestdb'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2370)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1183)
at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3351)
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$4.fastFetchQuery(JdbcDatabaseSnapshot.java:365)
at liquibase.snapshot.ResultSetCache$SingleResultSetExtractor.fastFetch(ResultSetCache.java:290)
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:58)
...
30 more
Please can someone help me ?