重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2103|回复: 1
打印 上一主题 下一主题

ORACLE 12C 使用备份集传输表空间

[复制链接]
跳转到指定楼层
楼主
发表于 2020-1-11 17:56:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[oracle@dbserver ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sat Jan 11 11:13:21 2020
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1544068695)
RMAN> backup to platform 'Microsoft Windows x86 64-bit' format '/tmp/tsp_tts.bak'
2>    datapump format '/tmp/tsp_tts.dmp'
3>    tablespace tsp_tts;
Starting backup at 11-JAN-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 device type=DISK
Running TRANSPORT_SET_CHECK on specified tablespaces
TRANSPORT_SET_CHECK completed successfully
Performing export of metadata for specified tablespaces...
   EXPDP> Starting "SYS"."TRANSPORT_EXP_ORCL_ndmj":  
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Master table "SYS"."TRANSPORT_EXP_ORCL_ndmj" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TRANSPORT_EXP_ORCL_ndmj is:
   EXPDP>   /u01/app/oracle/product/12.1.0/dbhome_1/dbs/backup_tts_ORCL_31430.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace TSP_TTS:
   EXPDP>   /u01/app/oracle/oradata/orcl/tsp_tts01.dbf
   EXPDP> Job "SYS"."TRANSPORT_EXP_ORCL_ndmj" successfully completed at Sat Jan 11 11:16:50 2020 elapsed 0 00:00:55
Export completed
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl/tsp_tts01.dbf
channel ORA_DISK_1: starting piece 1 at 11-JAN-20
channel ORA_DISK_1: finished piece 1 at 11-JAN-20
piece handle=/tmp/tsp_tts.bak tag=TAG20200111T111549 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
input Data Pump dump file=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/backup_tts_ORCL_31430.dmp
channel ORA_DISK_1: starting piece 1 at 11-JAN-20
channel ORA_DISK_1: finished piece 1 at 11-JAN-20
piece handle=/tmp/tsp_tts.dmp tag=TAG20200111T111549 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-JAN-20
RMAN>


--目标端
RMAN> restore foreign tablespace tsp_tts
2>     format 'D:\ORACLE\ORADATA\ORCL\zq-tsp_tts01.dbf'
3>    from backupset 'd:\oracle\oradata\tsp_tts.bak'
4>    dump file from backupset 'd:\oracle\oradata\tsp_tts.dmp';
启动 restore 于 11-1月 -20
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=242 设备类型=DISK
通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 正在还原外部表空间 TSP_TTS 中的所有文件
通道 ORA_DISK_1: 正在读取备份片段 d:\oracle\oradata\tsp_tts.bak
通道 ORA_DISK_1: 正在将外部文件 9 还原到 D:\ORACLE\ORADATA\ORCL\ZQ-TSP_TTS01.DBF
通道 ORA_DISK_1: 外部片段句柄=d:\oracle\oradata\tsp_tts.bak
通道 ORA_DISK_1: 已还原备份片段 1
通道 ORA_DISK_1: 还原完成, 用时: 00:00:02
通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 正在将数据泵转储文件还原到 d:\oracle\product\12.1.0\dbhome_1/dbs/backup_tts_ORCL_15328.dmp
通道 ORA_DISK_1: 正在读取备份片段 d:\oracle\oradata\tsp_tts.dmp
通道 ORA_DISK_1: 外部片段句柄=d:\oracle\oradata\tsp_tts.dmp
通道 ORA_DISK_1: 已还原备份片段 1
通道 ORA_DISK_1: 还原完成, 用时: 00:00:02
正在执行元数据导入...
   IMPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_IMP_ORCL_rBrc"
   IMPDP> 启动 "SYS"."TSPITR_IMP_ORCL_rBrc":
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> 作业 "SYS"."TSPITR_IMP_ORCL_rBrc" 已于 星期六 1月 11 11:24:14 2020 elapsed 0 00:00:15 成功完成
导入完毕
完成 restore 于 11-1月 -20


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2020-1-11 17:58:23 | 只看该作者
目标端转换:

[oracle@dbserver ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sat Jan 11 11:27:56 2020
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1544068695)
RMAN> backup for transport format '/tmp/tsp_tts.bak'
2>    datapump format '/tmp/tsp_tts.dmp'
3>    tablespace tsp_tts
4>    ;
Starting backup at 11-JAN-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK
Running TRANSPORT_SET_CHECK on specified tablespaces
TRANSPORT_SET_CHECK completed successfully
Performing export of metadata for specified tablespaces...
   EXPDP> Starting "SYS"."TRANSPORT_EXP_ORCL_mkbD":  
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Master table "SYS"."TRANSPORT_EXP_ORCL_mkbD" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TRANSPORT_EXP_ORCL_mkbD is:
   EXPDP>   /u01/app/oracle/product/12.1.0/dbhome_1/dbs/backup_tts_ORCL_24916.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace TSP_TTS:
   EXPDP>   /u01/app/oracle/oradata/orcl/tsp_tts01.dbf
   EXPDP> Job "SYS"."TRANSPORT_EXP_ORCL_mkbD" successfully completed at Sat Jan 11 11:30:01 2020 elapsed 0 00:00:53
Export completed
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl/tsp_tts01.dbf
channel ORA_DISK_1: starting piece 1 at 11-JAN-20
channel ORA_DISK_1: finished piece 1 at 11-JAN-20
piece handle=/tmp/tsp_tts.bak tag=TAG20200111T112902 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
input Data Pump dump file=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/backup_tts_ORCL_24916.dmp
channel ORA_DISK_1: starting piece 1 at 11-JAN-20
channel ORA_DISK_1: finished piece 1 at 11-JAN-20
piece handle=/tmp/tsp_tts.dmp tag=TAG20200111T112902 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-JAN-20
RMAN>


--目标端转换

RMAN> restore from platform 'Linux x86 64-bit'
2>    foreign tablespace tsp_tts format 'd:\oracle\oradata\orcl\sztech-tsp_tts01.dbf'
3>    from backupset 'd:\oracle\oradata\tsp_tts.bak'
4>    dump file from backupset 'd:\oracle\oradata\tsp_tts.dmp'
5>    ;
启动 restore 于 11-1月 -20
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 正在还原外部表空间 TSP_TTS 中的所有文件
通道 ORA_DISK_1: 正在读取备份片段 d:\oracle\oradata\tsp_tts.bak
通道 ORA_DISK_1: 正在将外部文件 9 还原到 D:\ORACLE\ORADATA\ORCL\SZTECH-TSP_TTS01.DBF
通道 ORA_DISK_1: 外部片段句柄=d:\oracle\oradata\tsp_tts.bak
通道 ORA_DISK_1: 已还原备份片段 1
通道 ORA_DISK_1: 还原完成, 用时: 00:00:02
通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 正在将数据泵转储文件还原到 d:\oracle\product\12.1.0\dbhome_1/dbs/backup_tts_ORCL_31210.dmp
通道 ORA_DISK_1: 正在读取备份片段 d:\oracle\oradata\tsp_tts.dmp
通道 ORA_DISK_1: 外部片段句柄=d:\oracle\oradata\tsp_tts.dmp
通道 ORA_DISK_1: 已还原备份片段 1
通道 ORA_DISK_1: 还原完成, 用时: 00:00:02
正在执行元数据导入...
   IMPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_IMP_ORCL_rxbe"
   IMPDP> 启动 "SYS"."TSPITR_IMP_ORCL_rxbe":
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> 作业 "SYS"."TSPITR_IMP_ORCL_rxbe" 已于 星期六 1月 11 11:46:22 2020 elapsed 0 00:00:14 成功完成
导入完毕
完成 restore 于 11-1月 -20
RMAN>

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-25 07:54 , Processed in 0.091462 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表