/*
项目需求
源数据库:192.168.56.130
被迁移对象:arcer
所属表空间:users
目标数据库:192.168.52.234
目标迁移对象:ARCER
所属表空间:ACTION_EIMS_TBS
*/
实施过程
/* --目标数据库 */ --创建表空间 create tablespace action_eims_tbs datafile '/u01/app/oracle/oradata/ORCL/action_eims_tbs01.dbf' size 200M autoextend on next 200M maxsize 2048M ; --创建用户 create user ARCER identified by ARCER DEFAULT TABLESPACE action_eims_tbs; grant dba,connect,resource to ARCER; --查看目录对象 set linesize 200 col OWNER for a15 col DIRECTORY_NAME for a30 col DIRECTORY_PATH for a80 select * from dba_directories; --创建目录对象 create directory expdp_dir as '/home/oracle/workstation/dump_dir'; --授权目录对象 grant read,write on directory expdp_dir to ARCER; --查看用户对象信息 set linesize 200 col SEGMENT_NAME for a30 col SEGMENT_TYPE for a30 col TABLESPACE_NAME for a30 select segment_name,segment_type,tablespace_name from user_segments; /* --源数据库 */ --导出数据 expdp arcer/arcer directory=dmp_dir dumpfile=arcer_20140910.dmp logfile=arcer_20140910.log /* --目标数据库 */ --导入数据 impdp ARCER/ARCER dumpfile=20140626_arcer.dmp directory=EXPDP_DIR remap_schema=arcer:ARCER remap_tablespace=users:action_eims_tbs