码迷,mamicode.com
首页 > 数据库 > 详细

oracle修改字符集

时间:2016-11-08 16:27:31      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:sim   round   back   nal   pen   err   acl   ora   complete   

在linux下面安装了oracle 11G,由于安装的时候没有注意导致字符集问题,impdp导入操作后中文乱码。

1.用命令select userenv(‘language‘) from dual;  查看了正常oracle和乱码oracle的字符,发现分别为  SIMPLIFIED CHINESE_CHINA.AL32UTF8SIMPLIFIED CHINESE_CHINA.WE8MSWIN1252,发现字符集WE8MSWIN1252错误。

2.修改字符集

 

>shutdown immediate; (database停了)

>startup mount; (database重开去可更改情況)

>alter system enable restricted session;

>alter system set job_queue_processes=0;

>alter system set aq_tm_processes=0;

>alter database open;

>alter database character se AL32UTF8;  (OR   >alter database character set internal_use AL32UTF8;

>shutdown immediate;

>startup; (重开正常oracle)

 3.进行导入操作

    impdp jmkj/123456 directory=jmkjdir  DUMPFILE=201611080000.dmp REMAP_SCHEMA=JMKJ:jmkj logfile=impdp.log;

    出现错误

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

 

    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39006: internal error
    ORA-39213: Metadata processing is not available

 4.修复ORA-39006,ORA-39213

     sqlplus / as sysdba

     SQL> execute dbms_metadata_util.load_stylesheets;

              PL/SQL procedure successfully completed.
     SQL> exit

5.再次导入成功

    impdp jmkj/123456 directory=jmkjdir  DUMPFILE=201611080000.dmp REMAP_SCHEMA=JMKJ:jmkj logfile=impdp.log;

oracle修改字符集

标签:sim   round   back   nal   pen   err   acl   ora   complete   

原文地址:http://www.cnblogs.com/SR71BlackBird/p/6043209.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!