- 最后登录
- 2014-9-16
- 在线时间
- 29 小时
- 威望
- 0
- 金钱
- 660
- 注册时间
- 2012-12-24
- 阅读权限
- 10
- 帖子
- 22
- 精华
- 0
- 积分
- 0
- UID
- 831
|
1#
发表于 2013-1-19 11:25:53
|
查看: 4722 |
回复: 2
一、数据库版本- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
- PL/SQL Release 10.2.0.4.0 - Production
- CORE 10.2.0.4.0 Production
- TNS for Linux: Version 10.2.0.4.0 - Production
- NLSRTL Version 10.2.0.4.0 - Production
复制代码 二、步骤
说明:同版本,相同字符集,相同的操作系统,导出库SID:hhps,导入库的SID:dbhhps
源数据库文件路径
/u01/app/oracle/oradata/hhps/index01.dbf
/u01/app/oracle/oradata/hhps/index02.dbf
/u01/app/oracle/oradata/hhps/user01.dbf
目的数据文件路径
/u01/app/oracle/oradata/dbhhps/datafile/index01.dbf
/u01/app/oracle/oradata/dbhhps/datafile/index02.dbf
/u01/app/oracle/oradata/dbhhps/datafile/user01.dbf- execute sys.dbms_tts.transport_set_check('users,index',true);
- select * from sys.transport_set_violations;
- alter tablespace users read only;
- alter tablespace index read only;
- create direcotry dmp_dir as /u01/dump';
- grant read ,write on directory dump_dir to gfc;
- grant read,write on directory dump_dir to hq;
- expdp system/123456@hhps dirctory=dump_dir dumpfile=transpofrt.dmp transport_tablespaces=users,index
复制代码 复制文件到目标机器
创建用户- create direcotry dump_dir as /u01/dump';
- grant read,write on directory dump_dir to hq;
- grant read,write on directory dump_dir to gfc;
- impdp system/future@dbhhps directory=dump_dir dumpfile=transport.dmp transport_datafiles='index01.dbf','index02.dbf','user01.dbf' remap_datafile='/u01/app/oracle/oradata/hhps/index01.dbf':'/u01/app/oracle/oradata/DBHHPS/datafile/index01.dbf','/u01/app/oracle/oradata/hhps/oradata/index02.dbf':'/u01/app/oracle/oradata/DBHHPS/oradata/index02.dbf','/u01/app/oracle/oradata/hhps/use01.dbf':'/u01/app/oracle/oradata/DBHHPS/datafile/user01.dbf' remap_schema=hq:hq,gfc:gfc
复制代码 三、结果- Import> status
- Job: SYS_IMPORT_TRANSPORTABLE_01
- Operation: IMPORT
- Mode: TRANSPORTABLE
- State: EXECUTING
- Bytes Processed: 0
- Current Parallelism: 1
- Job Error Count: 0
- Dump File: /u01/dump/transport.dmp
-
- Worker 1 Status:
- State: EXECUTING
复制代码 不报错也不显示完成,查看数据库没有相关对象 |
|