IMP Import Database report ora-01400 error Resolution ___ Database

Source: Internet
Author: User
Tags reserved import database
Oracle server-enterprise edition-version:11.1.0.6 to 11.2.0.1-release:11.1 to 11.2
Oracle server-enterprise edition-version:11.1.0.6 to 11.2.0.1 [release:11.1 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 18-nov-2011*** SymptomsYou are exported a table using the original Export utility (exp) in direct path mode. During Import, you received the errors:

. . Importing table "A_tab"
Imp-00019:row rejected due to ORACLE error 1400
Imp-00003:oracle Error 1400 encountered
Ora-01400:cannot insert NULL into ("TEST".) A_tab "." COL001 ")
Column:1
Column:

Despite the mentioned column COL001 has a default value.

This can is reproduced with the following test:

Connect/as SYSDBA
Drop user test cascade;

Create user test identified by test default tablespace users temporary tablespace temp;
Grant Connect, resource to test;

Connect Test/test

CREATE TABLE A_tab
(
ID number NOT NULL
);

INSERT into A_tab (ID) values (1);
INSERT into A_tab (ID) values (2);
Commit

ALTER TABLE A_tab Add (col001 number (6,2) default 1 not NULL);

SELECT * from A_tab;

ID COL001
---------- ----------
1 1
2 1

2 rows selected.

#> exp test/test file=a_tab.dmp tables=a_tab direct=y

Export:release 11.1.0.7.0-production on Mon 18 17:03:46 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:oracle Database 11g Enterprise Edition release 11.1.0.7.0-production
With the partitioning, OLAP, Data Mining and real application testing options
Export done in we8mswin1252 character set and Al16utf16 NCHAR character set

About to export specified tables via Direct Path ...
. . Exporting table A_tab 2 rows exported
Export terminated successfully without warnings.

Connect Test/test

drop table A_tab Purge;

#> Imp test/test file=a_tab.dmp tables=a_tab

Import:release 11.1.0.7.0-production on Mon 18 17:19:21 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:oracle Database 11g Enterprise Edition release 11.1.0.7.0-production
With the partitioning, OLAP, Data Mining and real application testing options

Export file created by export:v11.01.00 via direct path
Import done in we8mswin1252 character set and Al16utf16 NCHAR character set
. Importing test ' s objects into test
. Importing test ' s objects into test
. . Importing table "A_tab"
Imp-00019:row rejected due to ORACLE error 1400
Imp-00003:oracle Error 1400 encountered
Ora-01400:cannot insert NULL into ("TEST".) A_tab "." COL001 ")
Column:1
Column:
Imp-00019:row rejected due to ORACLE error 1400
Imp-00003:oracle Error 1400 encountered
Ora-01400:cannot insert NULL into ("TEST".) A_tab "." COL001 ")
Column:2
column:0 Rows Imported
Import terminated successfully with warnings.
causeThe root cause of this behavior are the new feature introduced with 11GR1:

-The Columns with property 1073741824 ("The column value of col$ for column COL001") are columns with defaults That are isn't saved in the column. This means in disk, the null values for this column must is replaced by its default obtained from the column definition:

Connect/as SYSDBA
Select col#, Name, property
From col$
where obj# in (select object_id
From Dba_objects
where owner = ' TEST ' and
object_name = ' a_tab ');

col# NAME Property
---------- ------------------------------ ----------
1 ID 0
2 COL001 1073741824

2 rows selected.

This mechanism doesn ' t work properly when direct path was used with original export (the value is not replaced by its DEFAU Lt But the NULL values are stored in export dump. This is produce ORA-1400 during import).

Original Export (exp) is desupported in 11g so there is no opened bug against this product. Solution1. Use DataPump Export/import utilities (EXPDP/IMPDP)

Or

2. Start Traditional Export Utility (exp) in Conventional path mode (DIRECT=N).

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.