Troubleshooting
Problem
When making a change in database configuration and run configure the database, you get the following issue:
Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
at com.microsoft.sqlserver.jdbc.SQLServerException(SQLServerException.java: 216)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 1515)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 1879)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 766)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd(SQLServerStatement.java: 689)
at com.microsoft.sqlserver.jdbc.TDSCommand(IOBuffer.java: 5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection(SQLServerConnection.java: 1715)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 180)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 155)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 616)
at com.microsoft.sqlserver.jdbc.SQLServerException(SQLServerException.java: 216)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 1515)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 1879)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 766)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd(SQLServerStatement.java: 689)
at com.microsoft.sqlserver.jdbc.TDSCommand(IOBuffer.java: 5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection(SQLServerConnection.java: 1715)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 180)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 155)
at com.microsoft.sqlserver.jdbc.SQLServerStatement(SQLServerStatement.java: 616)
Symptom
You have a mismatch of two different collations in your table.
run the following query:
SELECT
col.name, col.collation_name
FROM
sys.columns col
WHERE
object_id = OBJECT_ID('YourTableName')
Resolving The Problem
run the follwing query
ALTER TABLE YourTableName ALTER COLUMN OffendingColumn VARCHAR(100) COLLATE Latin1_General_CI_AS NOT NULL
Document Location
Worldwide
[{"Type":"SW","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"ARM Category":[{"code":"a8m50000000CbCgAAK","label":"System"}],"ARM Case Number":"TS005300832","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.6.0"}]
Was this topic helpful?
Document Information
Modified date:
08 April 2021
UID
ibm16441339