您的位置:首页 > 其它

exp 命令使用说明

2012-03-07 11:05 274 查看
一、导出表

1、导出自己的表

exp userid=scott/giger@orcl tables=(emp,.....) file=d:\e.dmp;

备:导出多张表之间用,逗号分别。linux 的路径和windows 路径区别。

2、导出其它方案的表

exp userid=sys/sys@orcl tables=(swserp.tbsuser) file='/tmp/e.dmp';

备:用户要导出其它方案的表,则需要dba的权限,grant 授予exp_full_database权限。

二、导出表结构

1、导出表结构

exp userid=swserp/swserp@orcl tables=(tbsuser,....) file='/tmp/m.dmp' rows=n;

2、使用直接导出方式

exp userid=swserp/swserp@orcl tables=(tbsuser,....) file='/tmp/m.dmp' direct=y

备:这种方式,当数据量大的时候,可以使用这样的方法。前提是,数据库的字符集与客户端的字符集要完全一致,否则会报错。

三、导出方案

1、导出自己的方案

exp swserp/swserp@orcl owner=swserp file ='/tmp/swserp.dmp'

备注:多个方案可以通过,逗号分开。

2、导出其它方案

exp sys/sys@orcl owner=(swserp) file='/tmp/swserp.dmp'

备注:需要有DBA的权限。

四、导出数据库

exp userid=system/system@orcl full=y inctype=complete file=x.dmp

备:必须有exp_full_database权限
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: