一.RMAN Catalog兼容性

MOS的文档:RMAN Compatibility Matrix [ID 73431.1]

 

1.1 About RMAN Compatibility

The RMAN environment can contain thefollowing components:

--RMAN 环境由以下5部分组成:

(2) Recovery catalog database

(3) Recovery catalog schema in therecovery catalog database

(4) Target database

(5) Auxiliary database (used forduplicate, duplicate for standby or tablespace point-in-time recovery)

 

Each componenthas a release number. Oracle uses up to 5 digits, but only up to 4 aresignificant for RMAN compatibility purposes.

--每个组件都有一个发行版本,其有5位数字组成,但只有前面4位影响RMAN 的兼容性。

Examples:10.1.0.4, 9.2.0.6, 8.1.7.4

 

关于Oracle 版本号的更多说明,参考我的Blog:

Oracle 版本号 说明

http://blog.csdn.net/tianlesoftware/article/details/6254920

 

1.2 RMAN Compatibility Matrix

In general, the rules of RMAN compatibilityare as follows:

--一般来说,RMAN兼容性规则如下:

(1) The RMAN executable versionshould be the same as the target database. Legal exception combinations arelisted in Table B-1.

--RMAN 可执行文件的版本要和目标数据库的版本一致,但也有例外,具体参考下表。

(2) The RMAN catalog schema versionmust be greater than or equal to the RMAN executable.

--RMAN catalog schema 的版本必须大于等于RMAN 可执行文件的版本。

(3) The RMAN catalog is backwardscompatible with target databases from earlier releases.

--RMAN catalog对target database目标数据库向后兼容,支持早期版本的目标数据库


Table B-1 RMAN Compatibility Table
Table B-1 shows version requirements for RMAN components.

 


 

 

Note 1 : Dueto Bug6756872 - RMAN REGISTER OF 11G TARGET INTO 10G CATALOG FAILS WITHORA-04028

 

1.3. RMAN compatibility: errors

 

When compatibility of components is brokenRMAN will rise one of the following errors:

--当遇到兼容性问题时,会报如下错误:

RMAN-6186 -associated message: "PL/SQL package %s.%s version %s in %s database is tooold"

RMAN-6429 -associated message: "%s database is not compatible with this version ofRMAN".

 

二.RMAN 对不同操作系统的支持

MOS 文档:RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support [ID 1079563.1]

 

Mixed platforms aresupported for:

--混合平台之间支持如下操作:

+ Active Database DUPLICATE
+ Backup-based DUPLICATE using image copies or backup sets
+ RESTORE and RECOVER using image copies or backup sets

 

Note that thefollowing platform combinations assume that the sourcedatabase is created at the same version as the destination database(i.e. was not upgraded from a version prior to that listed inthe heading for that combination).

注意以下操作系统的组合,这里假设DB version相同:

 

(1) For Oracle Database 10g Release 2 and above releases:

--在Oracle 10gR2 之后的版本,支持如下操作系统之间的RMAN 操作:

Solaris x86-64 <-> Linux x86-64

HP-PA <-> HP-IA

Windows IA (64-bit) / Windows (64-bitItanium) <-> Windows 64-bit for AMD / Windows (x86-64)

 

(2) For Oracle Database 11g Release 1 and above releases (requiresminimum 11.1 compatible setting):

--在Oracle 11gR1 之后的版本,支持如下操作系统之间的RMAN 操作,当然这里也包含第一条里提到的10gR2后的组合。

Linux <-> Windows

 

(3)For Oracle Database 11g Release 2(11.2.0.2) and above releases:

Solaris SPARC (64-bit) <-> AIX(64-bit) - Note: this platform combination is currently not supported due toBug 12702521

--在11gR2中,因为Bug 12702521的存在,SolarisSPARC (64-bit) <-> AIX (64-bit) 这2个版本之间不能进行RMAN 操作。

 

三. 不同平台和版本之间使用RMAN的常见问题

MOS 文档:

Frequently Asked Questions about RestoringOr Duplicating Between Different Versions And Platforms [ID 369644.1]

 

3.1 Can I restore orduplicate my previous version database using a later version of Oracle?

RMAN can restorea backup taken on an older database release into a newer release. The olderbackups must be taken on 9.2 or later release.

--RMAN 可以restore 备份从旧的DB version到新的DBversion,但这个旧version 必须大于等于9.2.

 

This method canbe used as part of an out-of-place database upgrade, in which the older backupsare restored to the newer release database and then the upgrade scripts are runas normal. Since the older database can remain online during the upgrade, thismay be preferable to an in-place upgrade, where the database must remainoffline.

--这种方法也是out-of-place 升级的一部分,其可以将旧的备份恢复到新的db上。

 

For example, Iwant to upgrade a 10.2 database to 11.2, using backups taken on the 10.2database. The 11.2 database will reside on a new host.

--例如,将DB 从10.2 升级到11.2.

 

The steps are:

操作步骤如下:

1. Install 11.2 binaries and latest patchsets on new host and prepare the 11.2 Oracle home per this doc.
2. Allow disk and/or tape backups to be accessible from the new host.
3. Restore backups to the 11.2 database and recover the database to a consistentpoint-in-time per this doc. --Do not open the database at this time.
4. Manually upgrade the 10.2 database to 11.2 per the instructions inthis doc,starting from the point immediately after the 11.2 software has beeninstalled.

 

Please ensure that you complete pre-upgrade/ post-upgrade procedures for various database components as listed under theupgrade docs for example:
Note837570.1 Complete Checklist for Manual Upgrades to 11gR2

 

Note: the above procedure is for restoringa 10.2 database that had never been upgraded to 11.2. If the database hasalready been upgraded, and you need to restore a backup that was created whilethe database was running as 10.2, you just need to restore and recover it, andmedia recovery will replay everything done by the upgrade.

 

RMAN "duplicate" is not supported as it will failattempting to automatically open the database after recovery (step #3).

--在上面的第三部操作不要打开数据库。

 

3.2 Can I restore or duplicate between two different patchsetlevels?

As you canrestore between different Oracle version, you can also do so between twodifferent patchset levels. See question #1 for details.

--可以在不同的Oracle 版本之间进行恢复,同样也可以在两个不同的patchset之间恢复。

 

Note, you mustfollow the instructions in the appropriate readme file. If resetlogs isrequired, you can execute:

--注意,必须按照文档里的步骤进行,如果需要进行resetlogs,可以执行如下:

SQL> alterdatabase open resetlogs upgrade;

OR

SQL> alterdatabase open resetlogs downgrade;

 

As needed beforeexecuting the required scripts to either upgrade or downgrade to a patchlevel.

Because RMAN "duplicate" attempts to automaticallyopen the database you may not use RMAN duplicate for this case, only RMANrestore.

 

3.3 Can I restore or duplicate between two different versionsof the same operating system?

--在不同操作系统版本上使用restore

For example, canI restore my 9.2.0.1.0 RMAN backup taken against a host running Solaris 9 to adifferent machine where 9.2.0.1.0 is installed but where that host is runningSolaris 10?

--能否在Solaris 9上resotre 到Solaris10上?

If the sameOracle Server installation CDs (media pack) can be used to install9.2.0.1.0 on Solaris 9 and Solaris 10, this type of restore is supportable.

--这里的决定条件是安装介质能否安装在这两种操作系统上,如果安装在2个不同版本的操作系统上都都能安装,那么可以进行restore 或者duplicate。

 

For example, isit possible to restore or duplicate my 9.2. 64-bit database to a 9.2.32-bitinstallation?

--能否restore 或者duplicate 从64位到32位?

 

It is preferableto keep the same bit version when performing a restore/recovery. However,excluding the use of duplicate command, the use of the same operating systemplatform should allow for a restore/recovery between bit levels (32 bit or 64bit) of Oracle. Note, this may be specific to the particular operating system andany problems with this should be reported to Oracle Support.

--一般都是推荐在相同的bit version 上进行操作。 这里注意duplicate命令,其必须要求是相同的bit version。

 

If you will berunning the 64-bit database against the 32-bit binary files or vice versa,after the recovery has ended the database bit version must be converted usingutlirp.sql.

--在上面提到,一般推荐是相同的bit version 上操作,但是也可以在不同的bit version上操作,除了duplicate命令。如果bitversion不同,在recovery 之后必须执行utlirp.sql 脚本。

 

See this notefor details on switching between bit sizes:

Note62290.1 Changing between 32-bit and 64-bit Word Sizes

 

If you do notrun utlirp.sql you will see errors including but not limited to:

ORA-06553:PLS-801: INTERNAL ERROR [56319]

--如果不执行这个脚本,就会遇到ORA-6553 的错误。

 

 

3.4 Is it possible to restore a laterversion backup to an earlier version of Oracle?

 

Say for exampleyou are preparing to upgrade to 11.2 from 10.2. After a successful upgrade andrunning on 11.2 for a few days you take a new backup of the 11.2 database. Youwant to know if run into a problem with 11.2 if you could restore the 11.2backup to 10.2 on another host (or reinstall 10.2 on the same host thenrestore the 11.2 backup).

--比如从11.2 restore 到10.2?

 

Such a restoreis possible if the COMPATIBLE parameter had never been increased after theupgrade. In this example, if the 11.2 database had always been run withCOMPATIBLE=10.2 then it is possible to restore a backup of the 11.2 databaseinto a 10.2 instance, then perform the downgrade procedures.

--restore 存在可能,如果自升级以后COMPATIBLE 参数没有变化,比如升级之前COMPATIBLE是10.2,升级之后还是10.2,那么就可以从11.2restore 到10.2, restore 之后执行downgrade 操作。

 

If the 11.2database has ever been opened with COMPATIBLE = 11.2, then this is not possible.Another good way for maintaining HA and the old version database (if you needto fall back) is to use the Data Guard rolling upgrade method which involves atransient logical standby database (a primary that temporarily becomes alogical standby just during the upgrade period). After upgrading the standby tonew version (and primary still running on old version), you can switchover andverify that upgraded database is working well. If it is not, you can switchbackto primary old version.

--如果升级之后,数据库用COMPATIBLE =11.2 来open,那么就没有可能restore回去。另一种替代的方法是使用HA。

 

3.5 Can I restore or duplicate my RMANbackup between two different platforms such as Solaris to Linux?

 

--能否在不同操作系统之间使用RMAN restore?

 

In general, you cannot restore or duplicatebetween two different platforms.

--一般来说,不能。

 

Note: Refer toNote 1079563.1 which lists supported mixed platforms and Oracleversions for duplicate/restore/recover.

在[1079563.1]文档中列出了支持的各种操作系统组合。 具体见第二小结。

 

In versionsprevious to 10g the only option to migrate from one platform to another wasusing export / import. With 10g, using the RMAN convert commands, you can crossbetween platforms using the 10g Cross-Platform Transportable Tablespacesoption. For more details review this note:

--在第二小节可以看到,RMAN 对不同操作系统的支持是从10gR2后支持,所以对10g之前版本的迁移,只能使用exp/imp.

10g以后可以使用RMAN 的Cross-PlatformTransportable Tablespaces。

 


Note243304.1 Transportable Tablespaces Across Different Platforms

and:

http://www.oracle.com/technetwork/database/features/availability/thehartfordprofile-xtts-133180.pdf

 

In version 10.2and later if the source and target OS are the same endian you may issue a"CONVERT DATABASE" so that datafiles are converted and ready fortransport to the destination machine. For more details about "CONVERTDATABASE" see:


Oracle Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2)
Chapter 15, RMAN Cross-Platform Transportable Databases and Tablespaces

 

Note: Refer toNote 732053.1 for 10.2 and 11.1 procedure to skip non-UNDO containing datafilesduring transportable database. This can significantly reduce the overallcompletion time. Also, note that 11.2 offers SKIP UNNECESSARY DATAFILES optionfor CONVERT DATABASE, to accomplish this.

 

转自:http://www.woxihuan.com/21879153/1329811766089380.shtml