[oracle@ocm1 ~]$ ll
total 32
-rw-r--r-- 1 oracle oinstall 24576 Mar 27 15:26 COUNTRIES.dmp
drwxr-xr-x 2 oracle oinstall  4096 Mar 27 12:39 script
drwxr-xr-x 2 oracle oinstall  4096 Mar 19 14:51 temp
下面是导入:
[oracle@ocm1 ~]$ 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
[oracle@ocm1 ~]$
头部验证失败是由于版本号不同所致,经试验可以通过如下方法进行修改:
可以看到头部信息 -TEXPORT:V11.01.00,即为源数据库的版本号,将其修改为目的数据库的版本号,
如本机为10.02.01,再次进行导入操作,导入成功
[oracle@ocm1 ~]$ vi COUNTRIES.dmp --直接使用vi修改下头部的版本号即可
^C^CiEXPORT:V10.02.00--之前是EXPORT:V11.02.00
USH
再次导入,成功:
[oracle@ocm1 ~]$ 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"         23 rows imported
Import terminated successfully with warnings.
[oracle@ocm1 ~]$
SYS@PROD> conn sh/sh
Connected.
SH@PROD> 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)
SH@PROD>
SH@PROD> select count(*) from COUNTRIES;
  COUNT(*)
----------
        23

备注:随笔中内容来源于网上资料整理,仅供参考。

最新文章

  1. Android-RecyclerView
  2. iOS - 文件操作(File Operating)
  3. jfreechart 实例
  4. Eclipse实现图形化界面插件-vs4e
  5. python之进程----Queue
  6. Okio 之初探黄龙
  7. Django 项目中添加静态文件夹
  8. 一天一个Linux命令--find
  9. numpy和matplotlib
  10. centos7下kubernetes(1。kubernetes---start)
  11. 帝国cms自动保存图片
  12. [Python]查询oracle导出结果至Excel并发送邮件
  13. source、sh、bash
  14. CentOS7 系统升级,删除centos7开机界面多余选,升级至最新的内核
  15. ES6的新API如Promise,Proxy,Array.form(),Object.assign()等,Babel不能转码, 使用babel-polyfill来解决
  16. python中for循环的底层实现机制 迭代
  17. unity-----------------------四元数与欧拉旋转方法
  18. js图片跟随鼠标移动
  19. Android Studio Note
  20. 谷歌上不去了,长久解决方式。能够稳定高速上Google和Gmail

热门文章

  1. Robot Framework安装部署详细教程
  2. #Week 11 - 343.Integer Break
  3. SpringBoot(六) -- SpringBoot错误处理机制
  4. css的继承之width属性(容易忽略)
  5. Developer Express 第三方控件使用系列方法
  6. AtCoder Beginner Contest 133 B - Good Distance
  7. 键盘按键KeyCode大全
  8. JavaScript之基础语法
  9. 使用ssh协议在linux主机之间快速上传和下载文件
  10. 2019牛客暑期多校训练营(第七场) - C - Governing sand - 平衡树