oracle使用expdp,impdp方式导入导出指定的表或按用户导入导出--数据迁移

–导出bzdzk_cloud_wangcheng/[email protected]:1521/orcl 用户
–创建逻辑目录
–select * from dba_directories;(查看管理员目录)
create directory cloud as ‘e:\cloud_wangcheng’
–给bzdzk_cloud_wangcheng用户赋予指定目录的操作权限(最好以system等管理员赋予)
grant read,write on directory cloud to bzdzk_cloud_wangcheng
–按用户导出
expdp bzdzk_cloud_wangcheng/[email protected]:1521/orcl schemas=bzdzk_cloud_wangcheng dumpfile=expdp.dmp DIRECTORY=cloud

–按用户导入
impdp bzdzk_cloud_wangcheng/[email protected]:1521/orcl directory=data_pump_dir dumpfile=EXPDP.DMP logfile=expdp.log remap_tablespace=TBS_WANGCHENG:tbs_cloud_wangcheng

–expdp导出指定的表
expdp bzdzk_yingshang/[email protected]:1521/orcl dumpfile=yingshang0930.dmp DIRECTORY=BACKUP tables=s_dept,s_dept_position,s_dept_positionrole

–impdp导入指定表
impdp bzdzk_xiangyang/[email protected]:1521/orcl directory=bzdzk_xiangyang dumpfile=YINGSHANG0930.DMP logfile=yingshang0930.log remap_schema=bzdzk_yingshang:bzdzk_xiangyang remap_tablespace=TBS_YINGSHANG:tbs_xiangyang

你可能感兴趣的:(oracle,数据库,笔记)