imp命令导入指定表_转载:Oracle导出导入dmp文件(exp.imp命令行)

1.说明

使用Oracle命令行导出导入dmp文件,

从而在两个数据库之间快速转移数据,

也可以用来作为数据库的备份,

将来可以快速恢复数据。

命令:导出exp、导入imp

步骤:

使用Oracle的exp命令将指定数据库导出为dmp文件;

然后将dmp文件上传到需要导入的数据库所在服务器;

使用Oracle的imp命令将dmp文件导入指定数据库。

2.导出exp

在Oracle数据库10.21.19.63上的guwei用户下,

有两张表USER_INFO,POLICY_INFO,

下面导出这两张表的所有数据,

导出命令:

exp guwei/ai123456@10.21.19.63/orcl file=guwei_user_policy.dmp tables=USER_INFO,POLICY_INFO

导出日志:

Export: Release 11.2.0.1.0 - Production on Mon Oct 28 03:08:08 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...

. . exporting table USER_INFO 150904330 rows exported

. . exporting table POLICY_INFO 10 rows exported

Export terminated successfully without warnings.

导出说明:

这里导出1.5亿条数据,耗时4分钟左右,

导出的guwei_user_policy.dmp文件大小为7.8G。

3.上传dmp文件

将dmp文件上传到需要导入的数据库所在服务器:

scp guwei_user_policy.dmp oracle@10.21.13.14:/home/oracle/script/guwei

4.导入imp

下面把USER_INFO,POLI

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值