Sorry, that was not right. The problem is actually in the isColumnAutoIncrement method. The line numbers are off, but I'm not sure how it is getting the problem you are seeing.
We have the following statement running: selectRS = getConnection().createStatement().executeQuery("SELECT " + escapeColumnName(schemaName, tableName, columnName) + " FROM " + escapeTableName(schemaName, tableName) + " WHERE 1 = 0"); but on MSSQL, the escapeColumnName and escapeTableName should return the value with []'s around them. Are you able to set a breakpoint or add logging to that SQL statement and see what is actually being sent through? Nathan -----Original Message----- From: Voxland, Nathan [mailto:nvoxl...@intelligentinsites.com] Sent: Thursday, April 23, 2009 9:43 AM To: liquibase-user@lists.sourceforge.net Subject: Re: [Liquibase-user] Error generating changelog Sorry for the delay answering. Your root problem is that liquibase.database.AbstractDatabase line 1142 needs to be changed from return "PK_" + tableName.toUpperCase(); to return "PK_" + escapeTableName(null, tableName).toUpperCase(); I'll probably not do a 1.9.4 release just for that, so if you could patch it locally, that would be best. If you have troubles getting it built, let me know and I can get you a build. Your log messages are probably fine. Not all tables that get found are added to the list of tables internally (if they are system tables, views, etc.). It is designed to assume that if the table does not exist in the internal list it assumes it is a special table and ignores the column. The log message is just for troubleshooting if something does go wrong. Nathan -----Original Message----- From: rynam0 [mailto:ryn...@gmail.com] Sent: Thursday, April 23, 2009 8:24 AM To: liquibase-user@lists.sourceforge.net Subject: Re: [Liquibase-user] Error generating changelog Hi: Running 1.9.3 did not make a difference in regards to the previous error and I am also seeing some logging in regards to some Table-valued Functions while attempting to generate an initial changelog. I'm seeing the following for many different columns and the functions do in fact exist so I'm not sure what the issue is here: Apr 23, 2009 9:10:38 AM liquibase.database.structure.SqlDatabaseSnapshot readColumns INFO: Could not find table or view fn5_assessment_select_list_role_dataadministrator for column Assessment_ID Any help at all in resolving these two issues would be greatly appreciated. I'm trying to get my team up and running using liquibase as it is just what our lifecycle is missing. Please help! ;-) Best, -Ryan rynam0 wrote: > > BTW: I am currently running version 1.9.2... I see that there is a 1.9.3 > version available so I will try that before checking out the code to > investigate for myself. > > Thanks. > > > > rynam0 wrote: >> >> Hello: >> I am attempting to generate my initial changelog on a SQLServer 2005 >> db and have come up against a situation where the generateChangelog >> command is throwing the below exception and I believe this is because the >> database contains a table that has a column with the name 'over' which is >> a reserved keyword. There is no way I can change the name of this column >> and recognize that keywords probably should not be used as column names, >> so I guess my query is this: Is there a way to patch this in the >> liquibase code? I have not had a chance to examine why this is happening >> but would LOVE to hear what can be done about this. Thanks in advance! >> >> -Ryan >> >> Apr 22, 2009 3:54:50 PM liquibase.commandline.Main main >> SEVERE: Incorrect syntax near the keyword 'over'. >> liquibase.exception.JDBCException: >> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near >> the keyword 'over'. >> at >> liquibase.database.structure.SqlDatabaseSnapshot.<init>(SqlDatabaseSnaps hot.java:100) >> at >> liquibase.database.structure.MSSQLDatabaseSnapshot.<init>(MSSQLDatabaseS napshot.java:26) >> at >> liquibase.database.MSSQLDatabase.createDatabaseSnapshot(MSSQLDatabase.ja va:282) >> at liquibase.diff.Diff.compare(Diff.java:62) >> at >> liquibase.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUt ils.java:135) >> at liquibase.commandline.Main.doMigration(Main.java:587) >> at liquibase.commandline.Main.main(Main.java:95) >> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect >> syntax near the keyword 'over'. >> at >> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Un known >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unkno wn >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Un known >> Source) >> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown >> Source) >> at >> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(Unknown >> Source) >> at >> liquibase.database.AbstractDatabase.isColumnAutoIncrement(AbstractDataba se.java:1142) >> at >> liquibase.database.structure.SqlDatabaseSnapshot.readColumns(SqlDatabase Snapshot.java:285) >> at >> liquibase.database.structure.SqlDatabaseSnapshot.<init>(SqlDatabaseSnaps hot.java:91) >> ... 6 more >> > > -- View this message in context: http://www.nabble.com/Error-generating-changelog-tp23175834p23196854.htm l Sent from the LiquiBase - User mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Liquibase-user mailing list Liquibase-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/liquibase-user ------------------------------------------------------------------------ ------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Liquibase-user mailing list Liquibase-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/liquibase-user ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Liquibase-user mailing list Liquibase-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/liquibase-user