NServiceBus.Persistence.Sql icon indicating copy to clipboard operation
NServiceBus.Persistence.Sql copied to clipboard

Support longer names for newer versions of Oracle

Open weralabaj opened this issue 8 years ago • 4 comments

In versions 12.2 and above the max name length is 128 bytes (source), but we always assume the max length is 30 bytes (as in Oracle 12.1 and below).

weralabaj avatar Oct 20 '17 14:10 weralabaj

I see two ways we can handle this. Either make it configurable or have a separate dialect. The advantage of the latter is that we not only limit/validate the names but also have stuff like hash-based index names. With 128 chars we could get away without hashes altogether I guess.

SzymonPobiega avatar Oct 21 '17 06:10 SzymonPobiega

:+1: for a separate dialect like in NHibernate.

MarcinHoppe avatar Oct 21 '17 12:10 MarcinHoppe

Capturing what we discussed today:

  • Separate dialect might be OK, but could double maintainability costs if most of the implementation of Oracle is duplicated. Perhaps the dialect only inherits and overrides a table name formatting function. But then it's not far off from a "don't throw if too long" option.
  • Need to be cognizant of forward/backward compatibility. If switching dialects or enabling an option results in mass changes to lots of table names, then that's a compatibility challenge. May be preferable to have a "stop throwing" option that would leave all existing names alone but just stop complaining if new, longer-named endpoints (with no table prefix metadata) are created in the future.

DavidBoike avatar Oct 23 '17 20:10 DavidBoike

Discussing it again today, we decided that the best approach is to make it configurable.

mikeminutillo avatar Jan 29 '21 07:01 mikeminutillo