1

Topic: The coding of request INSERT, ORA-12899

There is a client application which  the text file in coding CP866 and tries to interpose the data into Oracle.
There is a problem with the coding. All data cyrillic and like 1 character should be = to 1 byte.
Problem on an example:
- Field VARCHAR2, the size 5 byte
- We try to interpose there '  ' and it is there and then caught exception: ORA-12899: value too large for columnvalue too large for column (actual: 10, maximum: 5)"
I.e. each character is encoded by two bytes. In a DB there is coding AL32UTF8. To change type of columns on VARCHAR2 (5 CHAR) it is impossible (an industrial DB).
Clever people prompted that in storage of application under.NET the text data is always stored in coding UTF16 and the line of request, accordingly has this coding that leads to an error.

2

Re: The coding of request INSERT, ORA-12899

Read on a subject "oracle NLS parameters", clarify, what parameters are used by your application.

3

Re: The coding of request INSERT, ORA-12899

MrLebovsky wrote:

it is impossible

well it is impossible, means ORA-12899 corresponds to the industrial purposes.

4

Re: The coding of request INSERT, ORA-12899

dmdmdm;
I.e. at usage of identical parameters NLS by the client application and a DB such problems do not arise?

5

Re: The coding of request INSERT, ORA-12899

Not identical at the server and the client, they different can be, and correspondence of the client coding to the data, which client  in a DB.

6

Re: The coding of request INSERT, ORA-12899

MrLebovsky wrote:

i.e. at usage of identical parameters NLS by the client application and a DB such
Problems do not arise?

Such - is not present. Problems thus will much the worst.

7

Re: The coding of request INSERT, ORA-12899

MrLebovsky wrote:

All data cyrillic and like 1 character should be = to 1 byte.

https://docs.oracle.com/database/121/NLSPG/ch2charset.htm#NLSPG171 wrote:

Figure 2-2 shows the number of bytes needed to store different kinds of characters in the UTF-8 character set. The ASCII character requires one byte, the non-ASCII Latin, Greek, Cyrillic, Arabic, and Hebrew characters require two bytes

8

Re: The coding of request INSERT, ORA-12899

MrLebovsky wrote:

All data cyrillic and like 1 character should be = to 1 byte.

MrLebovsky wrote:

In a DB there is coding AL32UTF8.

MrLebovsky wrote:

Clever people prompted that in storage of application under.NET the text data is always stored in coding UTF16 and the line of request, accordingly has this coding that leads to an error.

Well as all it can arise together in a brain and not cause a dissonance?
sad