重庆思庄Oracle、Redhat认证学习论坛

标题: oracle imp导入时遇到字符集告警 [打印本页]

作者: 刘泽宇    时间: 2021-4-30 10:38
标题: oracle imp导入时遇到字符集告警
将导出的文件拷贝到本地进行导入时,遇到了这样的提示
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
...
import done in US7ASCII character set and AL16UTF16 NCHAR character set
export client uses ZHS16GBK character set (possible charset conversion)
...
执行导入后发现数据显示全是乱码,原因就在于导入的数据库和导入的数据库字符集不一样

源库的字符集是ZHS16GBK,需要将本地数据库的字符集进行更改
SQL> shutdown immediate;
SQL> startup mount;
SQL> ALTER DATABASE CHARACTER SETZHS16GBK;
若出现报错,则执行:
SQL> ALTER SYSTEM ENABLE RESTRICTEDSESSION;
SQL> alter database open;
SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2