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

你可能感兴趣的:(expdp)