Tuesday 12 November 2013

Resolving ORA-02374: conversion error loading table during impdp


Iam trying to do an import of a table into 11.2.0.2 database and facing the below mentioned error:

ORA-02374: conversion error loading table "MINE_USR"."POPUPS_PROJECT_BIN"
ORA-12899: value too large for column MINE_TEXT (actual: 66, maximum: 64)
ORA-02372: data for row: MINE_TEXT : 0X'45737061C3B16F6C2020202020202020202020202020202020'


Details:


1.        Used expdp and created a dump for the table: MINE_USR. POPUPS_PROJECT_BIN

2.        While doing a impdp on the target database :

ORA-02374: conversion error loading table "MINE_USR"."POPUPS_PROJECT_BIN"
ORA-12899: value too large for column MINE_TEXT (actual: 66, maximum: 64)
ORA-02372: data for row: MINE_TEXT : 0X'45737061C3B16F6C2020202020202020202020202020202020'

Solution:

When you describe the table, you will see that the column MINE_TEXT is char(64):

SQL> desc MINE_USR.POPUPS_PROJECT_BIN
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 MINE_IDX                                NOT NULL NUMBER(5)
 MINE_IDX                                 NOT NULL NUMBER(5)
 MINE_COLUMN                                     NUMBER(5)
 MINE_VALUE                                      NUMBER(5)
 MINE_TEXT                                         CHAR(64)

Execute the below to modify the column of the table:

SQL> alter table MINE_USR.POPUPS_PROJECT_BIN modify MINE_TEXT CHAR(66);
Table altered.

Now perform the import using the below command:

impdp directory=DATA_PUMP_DIR dumpfile=MINE_USR.dmp logfile=MINE_USR.log tables=MINE_USR.POPUPS_PROJECT_BIN table_exists_action=truncate




2 comments: