Cross-Platform Data Transport Using Backup Sets

本文档详细介绍了如何使用RMAN的备份集进行跨平台数据传输。这种方法适用于目标数据库为Oracle Database 12c Release 1及更高版本。在源数据库上创建备份集,然后使用expdp命令生成Data Pump导出文件。在目标数据库上,通过RESTORE命令恢复备份,并使用impdp命令导入Data Pump导出文件。文中还提到了FOREIGN TABLESPACE、TO PLATFORM和FOR TRANSPORT等关键概念,以及如何处理不同字节序的转换。同时,介绍了如何使用RESTORE命令的DUMP FILE和FROM PLATFORM子句来指定备份集和导出文件的位置。最后,讨论了如何恢复不一致和增量备份,以及跨平台传输只读表空间的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • Overview of Cross-Platform Data Transport Using Backup Sets

RMAN does not catalog backup sets created for cross-platform transport in the control file. This ensures that backup sets created for cross-platform transport are not used during regular restore operations.

To perform cross-platform data transport using backup sets, the version of the destination database must be Oracle Database 12c Release 1 (12.1) or later. 但注意源库没有版本要求

Although the TO PLATFORM and FOR TRANSPORT clauses are not supported in Oracle Database 10g Release 2 (10.2) or Oracle Database 11g, you can transport data from these versions of the database to Oracle Database 12c Release 1 (12.1). On the source database, you first create backup sets of the tablespaces to be transported and then create the Data Pump export dump file by using the expdp command. To restore these backups on the destination database, you perform a restore operation using the RESTORE command and then use the impdp command to import the Data Pump export dump file.

  1. Basic Terms Used in Cross-Platform Data Transport Using Backup Sets
  1. Foreign Data File 即对于目标库来说外来数据文件

Data files that do not belong to the destination database are called foreign data files. These data files are being plugged in to the destination database as part of a data transfer to the destination database. In the source database, this data file is identified by its original data file number.

  1. Foreign Tablespace 即对于目标库来说外来表空间

foreign tablespace is a set of foreign data files that comprise a tablespace in the source database. These foreign data files do not belong to the destination database, but are being transported into the destination database and are identified by the original tablespace name in the source database.

  1. Using BACKUP Command with For Transport or To Platform on the Source database

FOR TRANSPORT表示备份时不进行数据文件转化而是在目标库RESTORE时进行,所以备份可用于不同目标库。如果目标库与源库endian不同,在RESTORE后需要手动CONVERT

When you use FOR TRANSPORT, the backup set that is created can be transported to any destination database. If the destination database uses an endian format that is different from that of the source database, then the required endian format conversion is performed on the destination database. The benefit of this method is that the processing overhead of the conversion operation is offloaded to the destination database.

TO PLATFORM表示在备份时数据转化,要求目标库与源库enian相同

When you use TO PLATFORM, the endian format conversion is performed on the source database. The target platform specified by the TO PLATFORM clause must be a supported platform for cross-platform transport. The V$TRANSPORTABLE_PLATFORM view contains the list of supported platforms.

如果需要在目标库进行转化需要在RESTORE中使用FROM PLATFORM子句

Use FROM PLATFORM to specify the name of the source platform on which the backup sets were created. The platform name must exactly match the name specified while creating the backup set. If there is a difference in the platform names, the restore operation fails.

  1. Data Pump Export Dump File Used for Cross-Platform Tablespace Transport

使用备份的传输表空间需要在备份时使用DATAPUMP子句,它同样会存于备份集中

On the source database, use the DATAPUMP clause in the BACKUP command to create the metadata required to plug tablespaces in to the target database. The metadata is stored in a Data Pump export dump file as a separate backup set. Use this backup set to plug the transported tablespaces in to the target database.

如果未指定DATAPUMP的FORMAT将使用BACKUP的FORMAT指定export dump file,如果均未指定则使用默认

You can specify how the backup set containing the tablespace metadata is named by using the FORMAT option with the DATAPUMP clause. If you omit the FORMAT option, then the format specified in the BACKUP command is used to name the export dump file. When no FORMAT option is specified in the BACKUP command, the default format is used.

RESTORE时使用DUMP FILE ... FROM BACKUPSET选项指定哪个备份集中包含export dump file

使用DATAPUMP选项可以指定还原export dump file的位置

Use the DATAPUMP clause in the RESTORE command to specify the location on the destination host to which the export dump file is restored. If you omit this clause, the dump file is restored to a default operating system-specific location.

默认dump file是自动导入的,也可使用NOIMPORT选项来手动导入

By default, RMAN automatically imports the export dump file after all the required foreign data files are restored. You can choose not to import the export dump file by specifying the NOIMPORT clause. If you do not import the export dump file as part of the restore operation, then you must manually import the dump file when you want to plug the tablespaces in to the destination database.

Note: If the export dump file is automatically imported (that is, the NOIMPORT clause is not used), then the destination database must be open in read/write mode.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值