1

I configure a Heterogenous Service from Oracle to access SQL Server using the ODBC Drive from Microsoft

It works, but some query in specific table return the right message for example:

ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Attempt to access a column 'UtilizaMetrica_DescontoComerci'. {42S22,NativeErr = 207}[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]

The right column 'UtilizaMetrica_DescontoComercial' has 32 characters, but truncate in the return message to 30 characters

AndyDaSilva52
  • 115
  • 3
  • 19

1 Answers1

0

It seems that OHS has a limitation on the length of a column name (30 characters).

Workaround is to shorten the name to an acceptable length by defining a shorter alias for that column or using a view to do the same thing.

SMor
  • 2,830
  • 4
  • 11
  • 14
  • `UtilizaMetrica_DescontoComerci` is 30 characters long. – Bob Jarvis - Слава Україні Jan 05 '19 at 23:05
  • @BobJarvis OP has already written that the column name is 31 characters. Shall we guess that the error message has already truncated the name because - you know - it doesn't support names that are longer? – SMor Jan 06 '19 at 01:27
  • I'm just calling out the inconsistency. I'd expect OP to post a clarification. I will point out that in Portugese the phrase "Utiliza métrica desconto comercial" means "Uses commercial discount metrics" (per Google Translate), so the question is "Did the message drop two characters, or only one?". – Bob Jarvis - Слава Україні Jan 06 '19 at 03:02
  • Your right @Bob Jarvis, I was thinking if there anything else that could be done or has to be as SMor said, rename the column or use a view – AndyDaSilva52 Jan 06 '19 at 03:46
  • The right name is `UtilizaMetrica_DescontoComercial` the error not show the last two `al` – AndyDaSilva52 Jan 06 '19 at 03:49
  • @BobJarvis Then call out the inconsistency as a comment to OP's question and make that exact point. What you did post was not helpful, sounds a little sarcastic, and is more than a little pedantic. And obviously wrong as we see now. – SMor Jan 06 '19 at 13:46