The source database partition table data to the historical database encountered a IMP-00058ORA-00904 error, the specific operation and solution is as follows:
The IMP-00058 ORA-00904 error occurs when migrating the source database partition table data to the historical database. The specific operation and solution are as follows:
\ '/As sysdba \' STATISTICS = NONEDATA_ONLY = y file =/backup/wxlun20130911.dmplog =/backup/wxlun20130911.implog fromuser = wxlun touser = wxlun_his buffer = 5400000
Import: Release 11.2.0.3.0-Production on Wed Sep 11 10: 54: 392013
Copyright (c) 1982,201 1, Oracle and/or itsaffiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real ApplicationTesting options
Export file created by EXPORT: V11.02.00 via conventional path
Warning: the objects were exported by WXLUN, not by you
Import done in ZHS16GBK character set and AL16UTF16 NCHAR characterset
. Importing WXLUN's objects into WXLUN_HIS
.. Importing partition "WXLUN_T01": "PT_201306"
IMP-00058: ORACLE error 904 encountered
ORA-00904: "TOEXPRESSCOMPANYID": invalid identifier
IMP-00057: Warning: Dump file may not contain data of allpartitions of this table
.. Importing partition "WXLUN_T02": "VAPT_201306" 12553338 rows imported
IMP-00057: Warning: Dump file may not containdata of all partitions of this table --- this error is reported because only one partition data is imported.
Import terminated successfully with warnings.
Table WXLUN_T02 partition data is imported successfully, and WXLUN_T01 fails to be imported. view the WXLUN_T01 table structure of the target database.
SYS @ wxlun_his> desc WXLUN. WXLUN_T01
Name Null? Type
-----------------------------------------------------------------------------
Bcid not null VARCHAR2 (20)
Formcode not null VARCHAR2 (50)
Currentstatus not null number (3)
Prestatus not null number (3)
Returnstatus number (3)
Operatetype not null number (5)
Currentdistributioncode not null VARCHAR2 (50)
Deliverstationid not null number (10)
Note not null VARCHAR2 (400)
Createby not null number (10)
Createdept not null number (10)
CREATETIME NOT NULL DATE
Isdeleted not null number (1)
Syncflag not null number (1)
SYNCTIME DATE
IPADDRESS VARCHAR2 (20)
CLIENTINFO VARCHAR2 (2000)
Source database WXLUN_T01 table structure
Sys @ wxlun: SQL> desc WXLUN. WXLUN_T01
Name Null? Type
---------------------------------------------------------------------------------------------------------------------------------
Bcid not null VARCHAR2 (20)
Formcode not null VARCHAR2 (50)
Currentstatus not null number (3)
Prestatus not null number (3)
Returnstatus number (3)
Operatetype not null number (5)
Currentdistributioncode not null VARCHAR2 (50)
Deliverstationid not null number (10)
Note not null VARCHAR2 (400)
Createby not null number (10)
Createdept not null number (10)
CREATETIME NOT NULL DATE
Isdeleted not null number (1)
Syncflag not null number (1)
SYNCTIME DATE
IPADDRESS VARCHAR2 (20)
CLIENTINFO VARCHAR2 (2000)
TODISTRIBUTIONCODE VARCHAR2 (100)
TOEXPRESSCOMPANYID NUMBER
It is found that two fields are added to the table of the source database (fields are added to some tables as needed). Add the corresponding fields to the target database table and re-import the failed table data:
SYS @ wxlun_his & gt; alter table WXLUN. WXLUN_T01 add TODISTRIBUTIONCODEVARCHAR2 (100 );
Alter table WXLUN. WXLUN_T01 add toexpresscompanyid number;
Table altered.
SYS @ wxlun_his>
Table altered.
$ Imp \ '/as sysdba \' STATISTICS = NONEDATA_ONLY = y file =/backup/logs =/backup/wxlun20130911.implog fromuser = wxlun touser = wxlun_his buffer = 5400000 tables = WXLUN_T01
Import: Release 11.2.0.3.0-Production on Wed Sep 11: 09: 282013
Copyright (c) 1982,201 1, Oracle and/or itsaffiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real ApplicationTesting options
Export file created by EXPORT: V11.02.00 via conventional path
Warning: the objects were exported by WXLUN, not by you
Import done in ZHS16GBK character set and AL16UTF16 NCHAR characterset
. Importing WXLUN's objects into WXLUN_HIS
.. Importing partition "WXLUN_T01": "PT_201306" 6779635 rowsimported --- import successful
IMP-00057: Warning: Dump file may not contain data of allpartitions of this table
Import terminated successfully with warnings.
$