Oracle RMAN 相容性 及 不同版本和不同平臺之間使用 常見問題說明

n-lauren發表於2012-06-13

一.RMAN Catalog相容性

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

1.1 About RMAN Compatibility

The RMAN environment can contain thefollowing components:

--RMAN 環境由以下5部分組成:

(1)RMAN executable

(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 : DuetoBug6756872- 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 platformsaresupported 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. combinationsassumethat the sourcedatabaseis created at the same version as the destination database(i.e.wasnot upgraded from a version prior to that listed intheheadingforthat combination).

注意以下作業系統的組合,這裡假設DB version相同:

(1) ForOracle Database 10g Release 2 and abovereleases:

--在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) ForOracle 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 thisdoc.
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 thisdoc.--Do not open the database at this time.
4. Manually upgrade the 10.2 database to 11.2 per the instructions inthisdoc,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.1Complete 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.1Changing 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 Oracleversionsfor 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.1Transportable 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.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22990797/viewspace-732637/,如需轉載,請註明出處,否則將追究法律責任。

相關文章