1

I have an issue with Teamcity and SQL server.

When I installed the SQL server I used the default collation type which is SQL_Latin1_General_CP1_CI_AS And for TeamCity DB it has to be Latin1_General_CS_AS according to their document, so for that, I created a DB called "TeamCity" and set the collation to Latin1_General_CS_AS. and while installing TeamCity and setting up the external database I connected it to that "TeamCity" DB that I created.

For the Teamcity project, I added only one Build Step (Just a simple step to get me started with TC): Runner type: Visual Studio (sln) & Targets: Clean, Build

And now when I try to run the project with Teamcity I get this error:

Unexpected exception: SQL error when doing 'Executing with parameters: [1585662168832] caused SQL error: ' while performing SQL query: select r.test_name_id, r.success_count, r.failure_count, r.last_failure_time, r.build_type_id from test_failure_rate r join #TT{build_type$} tmp on r.build_type_id = tmp.build_type_id where (r.last_failure_time is null or r.last_failure_time > ?) order by r.test_name_id: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CS_AS" in the equal to operation.

Does the collation type for the server effect TeamCity DB regardless of what collation the DB is set to? and how can I fix this?

5
  • 1
    The problem is the JOIN. The tables have different collations. If this is a fresh installation of SQL Server, i suggest a reinstalling if I am honest, with the collation you need. You'll have an easier time than trying to change the server's collation.
    – Thom A
    Apr 5, 2020 at 16:27
  • And how would I change the settings and update the DB connection in Teamcity after that? @Larnu Apr 5, 2020 at 17:00
  • You'd have to start again there too. This is why I said if this is a fresh installtion.
    – Thom A
    Apr 5, 2020 at 17:01
  • Thanks, Larnu I installed a SQL server with collation "Latin1_General_CS_AS" and restored the old Teamcity DB used, after that, I changed the server name in <TeamCity Data Directory>/config/database.properties to the new server name without the need of reinstalling TC again Apr 6, 2020 at 7:41
  • @HadeelSwedan See my answer on Cannot resolve the collation conflict between ... in the equal to operation. May 9, 2020 at 19:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.