Before doing a system, encountered a problem! Today, I accidentally found the solution to this problem and posted it!!!
Problem Description:
VARCHAR2 (4000) ABC;
Intert into table_name (ABC) VALUES (' Here are 1500 characters ... ');
Error: Insert character too long! After testing, found that a Chinese character accounted for 3 bytes, so the error!!!
The problem lies in:
The use of the character set is UTF8, this error can occur!
To view using commands:
Sql> SELECT * from v$nls_parameters where parameter= ' nls_characterset ';
PARAMETER
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
Nls_characterset
Al32utf8
Workaround:
It is recommended that you use the ZHS16GBK character set!
Operation:
Sql> SHUTDOWN IMMEDIATE;
Sql> STARTUP MOUNT;
sql> ALTER SYSTEM ENABLE restricted session;
sql> ALTER SYSTEM SET job_queue_processes=0;
sql> ALTER DATABASE OPEN;
sql> ALTER DATABASE CHARACTER SET AL32UTF8/ZHS16GBK;
Sql> SHUTDOWN IMMEDIATE;
Sql> STARTUP;
Problem solved!