oracle修改字元集

來源:互聯網
上載者:User

標籤:sim   round   back   nal   pen   err   acl   ora   complete   

在linux下面安裝了oracle 11G,由於安裝的時候沒有注意導致字元集問題,impdp匯入操作後中文亂碼。

1.用命令select userenv(‘language‘) from dual;  查看了正常oracle和亂碼oracle的字元,發現分別為  SIMPLIFIED CHINESE_CHINA.AL32UTF8和SIMPLIFIED 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修改字元集

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.