[email protected] ~]$ LL
Total 32
-rw-r--r--1 Oracle oinstall 24576 Mar 15:26 countries.dmp
Drwxr-xr-x 2 Oracle Oinstall 4096 Mar 12:39 script
Drwxr-xr-x 2 Oracle oinstall 4096 Mar 14:51 Temp
Here is the import:
[Email protected] ~]$ Imp
Import:release 10.2.0.1.0-production on Thu Mar 27 15:31:30 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username:sh
Password:
Connected to:oracle Database 10g Enterprise Edition Release 10.2.0.1.0-production
With the partitioning, OLAP and Data Mining options
Import file:expdat.dmp >/home/oracle/countries.dmp
Enter Insert buffer Size (minimum is 8192) 30720>
Imp-00010:not a valid export file, header failed verification
Imp-00000:import terminated unsuccessfully
[Email protected] ~]$
The failure of the head verification is due to the different version number, which can be modified by the following methods:
You can see the header information-texport:v11.01.00, which is the version number of the source database, and modify it to the version number of the destination database.
If this machine is 10.02.01, import operation again, import successful
[[Email protected] ~]$ VI countries.dmp--Modify the version number of the head directly with VI
^c^ciexport:v10.02.00--was export:v11.02.00 before.
USH
Import again, success:
[Email protected] ~]$ Imp
Import:release 10.2.0.1.0-production on Thu Mar 27 15:36:22 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username:sh
Password:
Connected to:oracle Database 10g Enterprise Edition Release 10.2.0.1.0-production
With the partitioning, OLAP and Data Mining options
Import file:expdat.dmp >/home/oracle/countries.dmp
Enter Insert buffer Size (minimum is 8192) 30720>
Export file created by export:v10.02.00 via conventional path
Import done in Al32utf8 character set and Al16utf16 NCHAR character set
List contents of import file Only (yes/no): no >
Ignore create error due to object existence (yes/no): no >
Import grants (yes/no): yes >
Import table Data (yes/no): yes >
Import entire export file (yes/no): no >
Username:sh
Enter table (T) or partition (T:P) names. Null list means all tables for user
Enter table (T) or partition (T:P) name or. If done:
. Importing SH ' s objects into SH
Imp-00008:unrecognized statement in the export file:
. Importing SH ' s objects into SH
. . Importing table "countries" rows imported
Import terminated successfully with warnings.
[Email protected] ~]$
[Email protected]> Conn Sh/sh
Connected.
[Email protected]> DESC COUNTRIES
Name Null? Type
----------------------------------------- -------- ----------------------------
country_id not NULL number
Country_iso_code not NULL CHAR (2)
Country_name not NULL VARCHAR2 (40)
Country_subregion not NULL VARCHAR2 (30)
country_subregion_id not NULL number
Country_region not NULL VARCHAR2 (20)
country_region_id not NULL number
Country_total not NULL VARCHAR2 (11)
country_total_id not NULL number
Country_name_hist VARCHAR2 (40)
[Email protected]>
[Email protected]> Select COUNT (*) from countries;
COUNT (*)
----------
23
Note: The contents of the essay are from the online data collation, for reference only.
IMP import DMP file in Linux system