Oracle Cross-platform data migration EXPDP/IMPDP character Set issues cause ORA-02374 ORA-12899 ORA-02372

Source: Internet
Author: User

Environment Description: Source database environment:Operating system: Windows SERVER 2008R2 Database version: single Instance ORACLE 11.2.0.1 target-side database environment:Operating system: Redhat Linux 6.5 x86 64bit database version: ORACLE 11g RAC 11.2.0.4 Fault Description:Export the data from the source database EXPDP and then impdp the import to the target database: ora-02374:conversion Error loading table "Qbjmes". " PROJECT "Ora-12899:value too large for column project_spec (actual:103, maximum:100) Ora-02372:data for Row:project_spe c:0x ' 3730b6a1bcb6302e382a302e362a323035302a39363028312e ' Fault Analysis:Source database Character Set: zhsgbk16 target-side database character set: Al32utf8 zhsgbk16 and UTF8 after the data encoding, the storage format is different, for Chinese speaking, GBK store a Chinese character occupies 2 bytes, UTF8 store a Chinese character occupies 3 bytes, this will cause, For example: The original GBK character encoded in a database in a table, the field of the Chinese: colum001 is a varchar length of 200, and the field of most of the existing data length of the row is basically 180 bytes, then the table Imports UTF8 encoded database, The field originally stored in most of the 180-byte Chinese characters, you need to 180*3/2=270 bytes of character length to normal storage, and at this time when performing the IMPDP import operation, the table structure will not change, that is, the original field definition colum001 length or maintain 200 , so when the import, will be error, the above error message appears. Processing Method: The first type: Re-export, importBefore the source Library performs an export operation, change the Qbjmes.project field to more than 103. Then, when you import to the target library, you will not get an error. Second: Empty the data from the error table, modify the length of the related field, and re-import the data that only imports the table.

Third: Modify the source database character set (not recommended), and then perform a re-export operation, with the following detailed steps:

Sql>shutdown IMMEDIATE;

Sql>startup MOUNT EXCLUSIVE;

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>alter DATABASE National CHARACTER SET internal_use UTF8;

Sql>shutdown immediate;

sql>startup;

Oracle Cross-platform data migration EXPDP/IMPDP character Set issues cause ORA-02374 ORA-12899 ORA-02372

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.