expdp和impdp

1,导出表数据
expdp liyongjie/liyongjie directory=test tables=score dumpfile=score.dmp logfile=exp_result.log
2,导出表的部分数据
expdp liyongjie/liyongjie directory=test tables=score query="'where mark > 80'" dumpfile=score.dmp logfile=exp_result.log
3,导出多个表的数据
expdp liyongjie/liyongjie directory=test tables=score,depart dumpfile=score_depart.dmp logfile=result.log
4,只导出表的数据(content=data_only,content=metadata_only只导出对象定义)
expdp liyongjie/liyongjie directory=test tables=score content=data_only dumpfile=score_data.dmp logfile=result.log
5,导出整个数据库
expdp liyongjie/liyongjie directory=test dumpfile=database.dmp full=y logfile=result.log
6,导出方案,默认是当前用户方案
expdp liyongjie/liyongjie directory=test dumpfile=liyongjie.dmp schemas=liyongjie logfile=result.log
7,导出表空间
expdp liyongjie/liyongjie directory=test dumpfile=users.dmp tablespaces=users logfile=result.log
8,限制导出文件大小及个数(文件名称为:database_01.dmp,database_02.dmp,...,文件大小10M)
expdp liyongjie/liyongjie directory=test dumpfile=database_%u.dmp filezie=10M full=y logfile=result.log
9,文件数据文件非常大,假设有500G,为了提高效率,可以使用parallel参数,参数值设置为cpu的个数,查看cpu的个数:show parameter cpu
expdp liyongjie/liyongjie directory=test dumpfile=database_%u.dmp filezie=10M full=y parallel = 2 logfile=result.log

其中DIRECTORY参数是oracle对象而非os目录,其创建过程:
create directory test as 'd:\test'


impdp liyongjie/liyongjie directory=test dumpfile=score.dmp logfile=imp_score.log
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值