#995 Script "Create Table Script" fails due to collation error

3.2.1
open
5
2012-12-29
2011-06-23
olddave
No

Hi,

With SQL Server 2005 I get this exception:

2011-06-23 10:26:57,321 [Thread-6] ERROR net.sourceforge.squirrel_sql.client.session.SessionManager - Failed to get allowed Schemas
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" 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 net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getSchemas(SQLDatabaseMetaData.java:275)
at net.sourceforge.squirrel_sql.client.session.SessionManager.getAllowedSchemas(SessionManager.java:686)
at net.sourceforge.squirrel_sql.client.session.SessionManager.getAllowedSchemas(SessionManager.java:638)
at net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfo.privateLoadSchemas(SchemaInfo.java:647)
at net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfo.loadSchemas(SchemaInfo.java:476)
at net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfo.privateLoadAll(SchemaInfo.java:280)
at net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfo.initialLoad(SchemaInfo.java:187)
at net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:240)
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:636)

When I select all my tables (50 of them) and try to generate a DDL script.

This gives a clue as to why

http://blog.sqlauthority.com/2007/06/11/sql-server-cannot-resolve-collation-conflict-for-equal-to-operation/

Discussion