前提:
源端字符集:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
目标端字符集:AMERICAN _ AMERICA. AL32UTF8
1. 查询源端和目标端字符集类型:select userenv(‘language’) from dual;
2. 修改目标端字符集:
3. shutdown immediate;
4. STARTUP MOUNT;
5. ALTER SYSTEM ENABLE RESTRICTED SESSION;
6. ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
7. ALTER SYSTEM SET AQ_TM_PROCESSES=0;
8. ALTER DATABASE OPEN;
9. ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
10. alter system set NLS_LANGUAGE='SIMPLIFIED CHINESE' scope=spfile;
11. alter system set NLS_TERRITORY='CHINA' scope=spfile;
12. shutdown immediate;
13. startup;
14. 再次查看可看到字符集已与源端字符集一致。
15. 将导出的DMP文件上传到Linux的/home/oracle目录
16. 进入数据库,创建impdp路径:create directory expdir as ‘/home/oracle’;
17. 授予system用户读写该路径权限:grant read,write on directory expdir to system;
18. 执行impdp操作:impdp system/***** directory=expdir dumpfile=$exp.dmp full=y logfile=$imp.log
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31060020/viewspace-2152041/,如需转载,请注明出处,否则将追究法律责任。