oracle| Chinese Characters | Problems 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;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.