`

windows下命令提示符导出oracle 数据表 (exp)

阅读更多
使用exp方式导出本地oracle数据库中的数据表


1.导出某个用户下的所有表
>exp user/password@172.22.0.84:1521/devdb file="d:fxfkgl20180521.dmp"
2.到处某个用户下的某张表
>exp user/password@172.22.0.84:1521/devdb  tables=(表名1,表名2) file="d:fxfkgl20180521.dmp"

----------------------》如下所示,即为导出成功
Export: Release 11.2.0.1.0 - Production on 星期五 11月 10 10:46:54 2017

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


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                        JD_TYPE2导出了      836987 行
成功终止导出, 没有出现警告。





导入dmp文件实例


imp user/password@192.168.20.212:1521/orcl file="d:fxfkgl20180521.dmp"  full=y


-- 参照



1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中
exp system/manager@TEST file=d:\daochu.dmp full=y
2 将数据库中system用户与sys用户的表导出
exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
3 将数据库中的表table1 、table2导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
数据的导入
1 将D:\daochu.dmp 中的数据导入 TEST数据库中。
imp system/manager@TEST file=d:\daochu.dmp ignore=y
上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。
在后面加上 ignore=y 就可以了。
2 将d:\daochu.dmp中的表table1 导入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics