ORA-12899: value too large for column (actual: 27, maximum: 20)

導入數據時報錯如下錯誤,這是由於原來的數據庫是GBK的,每一個漢字兩個字節,但新數據庫是UTF-8的,每一個漢字是三個字節,致使超過長度了。
ORA-12899: value too large for column  (actual: 27, maximum: 20)
 
解決:
開始-->運行-->cmd,以後輸入:"sqlplus /nolog",進入"SQL>"的提示,按照下面給出的命令依次執行就能夠了:
SQL>connect username/password as SYSDBA;
SQL>SHUTDOWN IMMEDIATE;

SQL>STARTUP MOUNT;
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;sql

SQL> ALTER DATABASE CHARACTER SET ZHS16GBK ;
ALTER DATABASE CHARACTER SET ZHS16GBK;
*ERROR at line 1:
ORA-12712: new character set must be a superset of old character set數據庫

報字符集不兼容,此時下INTERNAL_USE指令不對字符集超集進行檢查:cmd

SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;im

相關文章
相關標籤/搜索