AL icon indicating copy to clipboard operation
AL copied to clipboard

Database collation setting - app install

Open Phfo opened this issue 8 years ago • 2 comments

When creating an app for BC of NAV2018 - do we have to use the same collation settings as the demo cronus db ? We've made a local db Latin1_General_100_CI_AS in stead of Latin1_General_100_CS_AS (like cronus). Everything works fine except when installing Image Analyzer app we have error : The following SQL error was unexpected: Cannot resolve the collation conflict between "Latin1_General_100_CI_AS" and "Latin1_General_100_CS_AS" in the equal to operation.

Phfo avatar Apr 19 '18 11:04 Phfo

@Phfo This is a platform issue around the tables/table extensions added by an extension package not responding to collation changes to the NAV database.

I was able to reproduce this error when I did the following:

  1. Create NAV Application & Tenant databases with the 'original' collation (CS & AS)
  2. Publish & Synchronize the Image Analyzer extension to the tenant database
  3. Change the collation of the NAV Application database (Change to CI)
  4. Synchronize the tenant database (should 'pickup' the collation change)
  5. Try to install the Image Analyzer extension

NOTE: This isn't a problem with the 'Image Analyzer extension' explicitly, it should happen with others that also add new tables/table extensions.

I was, however, able to fix this by 'resyncing' the Image Analyzer extension's schema via cmdlets. WARNING: this will remove any/all data within the 'Image Analyzer' tables for all versions of the extension

Sync-NavApp -ServerInstance <server> -Tenant <id> -Name 'Image Analyzer' -Mode Clean Sync-NavApp -ServerInstance <server> -Tenant <id> -Name 'Image Analyzer'

This recreates the extension tables in SQL with the 'proper' collation and everything was 'o.k.' at that point.

ghost avatar Apr 24 '18 20:04 ghost

There is some large up coming work around Collation in general in the platform and so the decision at this point is to completely block collation changes when any extensions are synchronized to a database until those changes are finalized.

ghost avatar May 09 '18 14:05 ghost