subash
subash

Reputation: 69

SQL Server to Oracle migration - ORA-12899: value too large for column

While migrating a SQL Server database to Oracle, I end up with an error

ORA-12899: value too large for column

though the datatypes are the same.

This is happening with strings like 'enthält'. The data type NVARCHAR(7) should be able to hold the given string in SQL Server where as on Oracle VARCHAR2(7) not able to hold the value and throwing value too large error.

Is this something with the encoding style on Oracle? How can we resolve this?

Thanks

Upvotes: 0

Views: 655

Answers (1)

tinazmu
tinazmu

Reputation: 5139

You can create your Oracle table with something like varchar2(7 char) this causes it to allocate in units of characters, not bytes. This succeeds:

create table tbl(x varchar2(7 char));
insert into tbl values ('enthält');

Upvotes: 0

Related Questions