版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011171125/article/details/85196133
export导出Oracle数据库
导出
导出表
- 导出自己的表
exp userid=scott/scott@orcl tables=(emp) file=d:\scott.dmp
- 导出其它方案的表
exp userid=system/oracle@orcl tables=(scott.emp) file=d:\scott2.dmp
- 导出表结构
exp userid=scott/scott@orcl tables=(emp) file=d:scott3.dmp rows=n
- 使用直接导出的方式
exp userid=scott/scott@orcl tables=(emp) file=d:\scott4.dmp direct=y
该方式导出速度快,数据量大时可以考虑该方式,但需要数据库的字符集与客户端字符集完全一致,否则会报错。
导出单个用户方案
使用scott账号导出Scott的用户方案
exp userid=scott/scott@orcl owner=scott file=d:\scott.dmp
或者
exp scott/scott@orcl owner=scott file=d:\scott.dmp
导出多个用户方案
exp userid=system/oracle@orcl owner=(system,scott) file=d:\files.dmp
或者
exp system/oracle@orcl owner=(system,scott) file=d:\files.dmp
注意:导出时注意账号的权限
导出数据库
导出所有数据库中的对象及数据(数据量大时导出时间较长),full=y
代表导出所有,inctype
增量备份
exp userid=system/oracle@orcl full=y inctype=complete file=d:\x.dmp