Import Fails with IMP-00058, ORA-1438

  • symptom: IMP-00058: ORACLE error 1438 encountered
  • symptom: ORA-01438: value larger than specified precision allows for this
  • event="1438 trace name errorstack level 10"

    例如

    imp-00058 oracle错误1438出现
    ora-01438:值大于此列指定的允许精确度
    imp-00018:上一个表的部分导入完成,导入6605531行

    [@more@]

    Subject: Import Fails with IMP-00058, ORA-1438 Errors
    Doc ID: Note:185229.1Type: PROBLEM
    Last Revision Date: 28-JUL-2005Status: PUBLISHED
    • fact: Oracle Server - Enterprise Edition
    • fact: Export Utility (EXP)
    • fact: Import Utility (IMP)
    • symptom: Running an import fails
    • symptom: IMP-00058: ORACLE error 1438 encountered
    • symptom: ORA-01438: value larger than specified precision allows for this column
    • symptom: IMP-00018: partial import of previous table completed: 178731 rows imported
    • cause: These symptoms can unfortunately be encountered if there is some form of corruption within the EXPORT database. However it can also be encountered when IMPORTING into the same or new database where the table has been recreated with an incorrect column definition.
    fix: The fix will depend on whether the symptoms are caused due to corruption or due to the incorrect creation of objects. If the former then it will be necessary to handle the corruption problem first and there is no set procedure for this since it will depend on scale. If the latter we should be able to workaround the problem using a testcase to explain the principles involved :- EXPORT DATABASE --------------- sqlplus system/manager create user exporttest identified by exporttest default tablespace USERS; grant dba to exporttest connect exporttest/exporttest create table precisiontest (num number(2)); insert into precisiontest values ('10'); --------------> this will work as expected commit; exit; exp exporttest/exporttest file=expdat.dmp tables=precisiontest IMPORT DATABASE --------------- (if the same as the EXPORT database then assume that we have dropped and recreated the table, also no need to recreate the user exporttest) sqlplus system/manager create user exporttest identified by exporttest default tablespace USERS; grant dba to exporttest connect exporttest/exporttest create table precisiontest (num number(1)); commit; exit; imp exporttest/exporttest file=expdat.dmp tables=precisiontest ignore=y The IMPORT will fail with IMP-00058 and ORA-01438 errors because we are now attempting to insert the value '10' into a column that has been defined as NUMBER(1). If export and import databases are different we can do a DESCRIBE on the table in question to see if they are the same. If only one database exists we can look at rerunning the IMPORT with :- event="1438 trace name errorstack level 10" This will show us what record we are failing on and will hopefully indicate what column needs to be corrected within the table so that the IMPORT can be performed successfully.
    请使用浏览器的分享功能分享到微信等