【MOS】關于在不同版本和平台之間進行還原或複制的常見問題 (文檔 ID 1526162.1)--跨版本恢複
Questions and Answers
1) 我能用更高版本的 Oracle 還原或複制舊版本的資料庫嗎?
2) 我能在兩個不同的更新檔程式集之間進行還原或複制嗎?
3) 我能在同一作業系統的不同版本之間進行還原或複制嗎?
4) Oracle 的位(bit)級别(32 位或 64 位)不比對時,可以進行還原或複制嗎?
5) 可以将更高版本的備份還原到較早版本的 Oracle 嗎?
6) 我能在兩個不同的平台之間還原或複制我的 RMAN 備份嗎,例如 Solaris 到 Linux?
适用于: Oracle Database - Enterprise Edition - 版本 9.0.1.0 和更高版本 Oracle Database - Standard Edition - 版本 9.0.1.0 和更高版本 本文檔所含資訊适用于所有平台用途本文檔回答了有關如何使用 RMAN 從舊版本以及具有不同字長的系統中還原備份的常見問題。下面列出了一些常與 Oracle 軟體更新相關的情形。如果您需要有關目前主題的更多資訊,請通過以下連結直接通路“ 備份和恢複社群”與Oracle 客戶和專家進行讨論: https://community.oracle.com/community/support/oracle_database/database_backup_and_recovery
問題和答案注意:以下部分中的還原是指使用者管理的(非 RMAN)還原或 RMAN 還原。複制(Duplicate)是隻有 RMAN 才具有的一種功能,但在提到複制時,它也适用于使用者管理的資料庫克隆。 1) 我能用更高版本的 Oracle 還原或複制舊版本的資料庫嗎?RMAN 可将在較舊的資料庫版本上進行的備份還原到較新的版本中。舊的備份必須是在 9.2 或更高版本的資料庫中進行的。 此方法可用作異地(out-of-place) 資料庫更新的一部分,其中,舊的備份被還原到新版本資料庫中,然後更新腳本照常運作。由于舊的資料庫在更新過程中可以保持連線狀态,是以這種方法相對于就地(in-place) 更新更為可取,在就地更新中資料庫必須保持離線狀态。 例如,我希望使用在 10.2 資料庫上進行的備份将資料庫更新到 11.2。11.2 資料庫将駐留在新的主機上。 步驟如下: 1. 在新主機上安裝 11.2 資料庫軟體和最新的更新檔程式集,并按照本 文檔 中的說明準備 11.2 Oracle 主目錄。 2. 允許從新主機通路磁盤和/或錄音帶備份 3. 将備份還原到 11.2 資料庫,并按照本 文檔 中的說明将資料庫恢複到一緻的時間點。Database Backup and Recovery User's Guide 20 Performing RMAN Recovery: Advanced Scenarios ... Restoring a Database on a New Host'此時不要打開資料庫。 4. 将 10.2 資料庫手動更新至 11.2,參考文檔Database Upgrade Guide 2 Preparing to Upgrade Oracle Database ... Manual Upgrade請確定您完成了相關更新文檔(如下所列)中列出的各種資料庫元件的更新前/更新後過程: Note 837570.1 Complete Checklist for Manual Upgrades to 11gR2 Note 1503653.1 Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)注意:上面的過程适用于還原從未更新至 11.2 的 10.2 資料庫。如果資料庫已經更新,而您需要通過更新之前的備份(版本10.2)還原資料庫,則您隻需要進行還原和恢複,媒體回複将重制由更新完成的一切内容。不支援 RMAN“複制”,因為該功能會在恢複之後嘗試自動打開資料庫時失敗(第 3 步)。 從12c開始DUPLICATE TARGET DATABASE增加新選項NOOPEN,這個選項更适合資料庫恢複。 . NOOPEN 指定duplicate資料庫是不打開資料庫。 預設RMAN建立duplicate資料庫後以RESETLOGS方式打開。.參考: http://docs.oracle.com/database/121/RCMRF/rcmsynta020.htm#i1011578 Oracle? Database Backup and Recovery Reference 12c Release 1 (12.1) E50791-03 . DUPLICATE . dupOptionList 2) 我能在兩個不同的更新檔程式集之間進行還原或複制嗎?正如您可以在不同的 Oracle 版本之間進行還原一樣,您也可以在兩個不同的更新檔程式集之間執行這一操作。有關詳細資訊,請參閱問題 1。請注意,您必須按照相應 Readme 檔案中的說明進行操作。如果需要重置日志(resetlogs),請在執行更新或降級至某個更新檔程式集所需的腳本之前,根據需要執行以下指令: SQL> alter database open resetlogs upgrade; 或 SQL> alter database open resetlogs downgrade;由于 RMAN“複制”會嘗試自動打開資料庫,是以,在這種情況下您就不應使用 RMAN 複制,而隻使用 RMAN 還原。 從12c開始DUPLICATE TARGET DATABASE增加新選項NOOPEN,這個選項更适合資料庫恢複。 . NOOPEN 指定duplicate資料庫是不打開資料庫。 預設RMAN建立duplicate資料庫後以RESETLOGS方式打開。.參考: http://docs.oracle.com/database/121/RCMRF/rcmsynta020.htm#i1011578 Oracle? Database Backup and Recovery Reference 12c Release 1 (12.1) E50791-03 . DUPLICATE . dupOptionList 3) 我能在同一作業系統的不同版本之間進行還原或複制嗎?例如,我能将在運作 Solaris 9 的主機上進行的 9.2.0.1.0 RMAN 備份還原到已安裝 9.2.0.1.0 但其主機卻運作 Solaris 10 的其他機器嗎? 如果可以使用相同的 Oracle Server 安裝 CD(媒體包)在 Solaris 9 和 Solaris 10 上安裝 9.2.0.1.0,則将支援這類還原。 4) Oracle 的位(bit)級别(32 位或 64 位)不比對時,可以進行還原或複制嗎?例如,可以将我的 9.2 版64 位資料庫還原或複制到 9.2.32 位安裝嗎?執行還原/恢複時,最好保持相同的位版本。但是,除使用複制指令外,使用相同的作業系統平台應該允許在 Oracle 位級别(32 位或 64 位)之間進行還原/恢複。請注意,這可能隻适用于特定的作業系統,若有與此相關的任何問題,應向 Oracle Support 報告。 如果您要使用 32 位軟體運作 64 位資料庫(或反之),則在恢複結束之後必須要使用 utlirp.sql 轉換資料庫位版本。 有關在位之間進行切換的詳細資訊,請參閱以下文檔:Note 62290.1 Changing between 32-bit and 64-bit Word Sizes 如果不運作 utlirp.sql,将會出現以下錯誤(不限于): ORA-06553: PLS-801: INTERNAL ERROR [56319] 5) 可以将更高版本的備份還原到較早版本的 Oracle 嗎?例如,您準備從 10.2 更新至 11.2。在成功更新并在 11.2 上運作幾天之後,您對 11.2 資料庫進行了新的備份。您想知道,如果 11.2 中出現問題,是否能夠将 11.2 備份還原到其他主機上,該主機安裝了 10.2 資料庫軟體,(或在同一主機上重新安裝 10.2,然後還原 11.2 備份)。 如果在更新後從未增加 COMPATIBLE 參數,則可以進行此類還原。在本示例中,如果 11.2 資料庫始終是在 COMPATIBLE 為 10.2 的情況下運作,則可以将 11.2 資料庫的備份還原到 10.2 執行個體中,然後執行降級過程。 如果資料庫已經在 COMPATIBLE 為 11.2 的情況下打開,則不能進行此類還原。另一種維護 HA 和舊版本資料庫(如果需要復原)的好方法是,使用 Data Guard 滾動(rolling)更新法,該方法涉及臨時邏輯備用資料庫(隻是在更新期間臨時把主資料庫變成邏輯備用資料庫)。将備用資料庫更新至新版本後(主資料庫仍然在舊版本上運作),您可以進行切換并驗證更新後的資料庫是否運作正常。如果運作不正常,您可以切換回到舊的版本。 6) 我能在兩個不同的平台之間還原或複制我的 RMAN 備份嗎,例如 Solaris 到 Linux?通常,您不能在兩個不同的平台之間進行還原或複制。注意:請參閱 Note 1079563.1 ,其中列出了 Oracle 支援的跨平台複制/還原/恢複的平台和 Oracle 版本。在 10g 之前的版本中,從一個平台遷移至另一個平台的唯一方法是使用導出/導入。在 10g 中,通過 RMAN 轉換(convert)指令,您可以使用 10g 跨平台可傳輸表空間(Cross-Platform Transportable Tablespaces)選項跨越各個平台。有關更多詳細資訊,請參閱以下文檔:Note 243304.1 Transportable Tablespaces Across Different Platforms以及:http://www.oracle.com/technetwork/database/features/availability/thehartfordprofile-xtts-133180.pdf 在 10.2 及更高版本中,如果源 OS 和目标 OS 具有相同的位元組序(endian),您可以發出“CONVERT DATABASE”指令,以便轉換資料檔案并使其準備好傳輸到目标機器。有關“CONVERT DATABASE”的更多詳細資訊,請參閱: Oracle Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Chapter 15, RMAN Cross-Platform Transportable Databases and Tablespaces 注意:請參閱 Note 732053.1 ,了解在版本10.2 和 11.1 中,如何在可傳輸資料庫(transportable database)期間跳過不包含UNDO資訊的資料檔案。該過程可大大減少總體完成時間。此外,請注意,為了實作這一目的,11.2 還針對 CONVERT DATABASE 提供了 SKIP UNNECESSARY DATAFILES 選項。如果是從 32 位到 64 位,還必須按照 Note 62290.1 中的說明改變字長。此外,在平台之間進行遷移時,可使用第三方應用程式,例如 VERITAS Storage Foundation 便捷式資料容器: http://eval.veritas.com/mktginfo/products/White_Papers/Storage_Server_Management/Portable_Data_Containers_for_Oracle.pdf (有關 VERITAS Storage Foundation 便捷式資料容器的資訊,請聯系 Veritas)社群讨論您可以在下面的社群參與對本文的讨論。下面的頁面是實時讨論頁面- 不是截屏;-)參考NOTE:560417.1 - Recovery Through Upgrade returns ORA-1092 on OpenNOTE:558408.1 - RMAN DUPLICATE / RESTORE a database to a higher patchsetNOTE:1079563.1 - RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform SupportNOTE:73431.1 - RMAN Compatibility MatrixNOTE:62290.1 - Changing between 32-bit and 64-bit Word SizesNOTE:732053.1 - Avoid Datafile Conversion during Transportable DatabaseNOTE:1503653.1 - Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)
In this Document
Purpose
Questions and Answers
1) Can I restore or duplicate my previous version database using a later version of Oracle?
2) Can I restore or duplicate between two different patchset levels?
3) Can I restore or duplicate between two different versions of the same operating system?
4) Is it possible to restore or duplicate when the bit level (32 bit or 64 bit) of Oracle does not match?
5) Is it possible to restore a later version backup to an earlier version of Oracle?
6) Can I restore or duplicate my RMAN backup between two different platforms such as Solaris to Linux?
References
Oracle Database - Standard Edition - Version 9.2.0.1 and later
Oracle Database - Enterprise Edition - Version 9.2.0.1 and later
Information in this document applies to any platform.
This note answers common questions relating to how RMAN can be used to restore backups from older releases and from systems with a different word size. These are scenarios that are often related to Oracle software upgrades.
In case you may want or need more about your current topic - please also access the Backup & Recover Community of Customers and Oracle Specialists directly via:
https://community.oracle.com/community/support/oracle_database/database_backup_and_recovery
Note: Restore in the following sections refers to either a user managed (non-RMAN) or a RMAN restore. Duplicate is a function of RMAN only but where duplicate is mentioned it also applies to user managed database cloning.
RMAN can restore a backup taken on an older database release into a newer release. The older backups must be taken on 9.2 or later release.
This method can be used as part of an out-of-place database upgrade, in which the older backups are restored to the newer release database and then the upgrade scripts are run as normal. Since the older database can remain online during the upgrade, this may be preferable to an in-place upgrade, where the database must remain offline.
For example, I want to upgrade a 10.2 database to 11.2, using backups taken on the 10.2 database. The 11.2 database will reside on a new host.
The steps are:
1. Install 11.2 binaries and latest patch sets on new host and prepare the 11.2 Oracle home per following Documentation - Database Upgrade Guide
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 consistent point-in-time per this doc.
Database Backup and Recovery User's Guide
20 Performing RMAN Recovery: Advanced Scenarios
... Restoring a Database on a New Host'
Do not open the database at this time.
4. Manually upgrade the 10.2 database to 11.2 per the instructions in this documentation
Database Upgrade Guide
2 Preparing to Upgrade Oracle Database
... Manual Upgrade
starting from the point immediately after the 11.2 software has been installed.
Please ensure that you complete pre-upgrade / post-upgrade procedures for various database components as listed under the upgrade docs for example:
Note 837570.1 Complete Checklist for Manual Upgrades to 11gR2
Note 1503653.1 Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)
Note: the above procedure is for restoring a 10.2 database that had never been upgraded to 11.2. If the database has already been upgraded, and you need to restore a backup that was created while the database was running as 10.2, you just need to restore and recover it, and media recovery will replay everything done by the upgrade.
RMAN "duplicate" is not supported as it will fail attempting to automatically open the database after recovery (step #3).
Starting from RDBMS 12c there is a new option available with the DUPLICATE TARGET DATABASE -> the NOOPEN-clause,
which is than suitable for restoring and recovering the database.
.
NOOPEN
Specifies that the duplicate database must not be opened after it is created.
By default, RMAN creates a duplicate database and then opens it in RESETLOGS mode.
.
Reference:
http://docs.oracle.com/database/121/RCMRF/rcmsynta020.htm#i1011578
Oracle? Database Backup and Recovery Reference
12c Release 1 (12.1)
E50791-03
DUPLICATE
dupOptionList
As you can restore between different Oracle version, you can also do so between two different patchset levels. See question #1 for details.
Note, you must follow the instructions in the appropriate readme file. If resetlogs is required, you can execute:
SQL> alter database open resetlogs upgrade;
OR
SQL> alter database open resetlogs downgrade;
As needed before executing the required scripts to either upgrade or downgrade to a patch level.
Because RMAN "duplicate" attempts to automatically open the database you may not use RMAN duplicate for this case, only RMAN restore.
For example, can I restore my 9.2.0.1.0 RMAN backup taken against a host running Solaris 9 to a different machine where 9.2.0.1.0 is installed but where that host is running Solaris 10?
If the same Oracle Server installation CDs (media pack) can be used to install 9.2.0.1.0 on Solaris 9 and Solaris 10, this type of restore is supportable.
For example, is it possible to restore or duplicate my 9.2. 64-bit database to a 9.2.32-bit installation?
It is preferable to keep the same bit version when performing a restore/recovery. However, excluding the use of duplicate command, the use of the same operating system platform should allow for a restore/recovery between bit levels (32 bit or 64 bit) of Oracle. Note, this may be specific to the particular operating system and any problems with this should be reported to Oracle Support.
If you will be running 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 using utlirp.sql.
See this note for details on switching between bit sizes:
Note 62290.1 Changing between 32-bit and 64-bit Word Sizes
If you do not run utlirp.sql you will see errors including but not limited to:
ORA-06553: PLS-801: INTERNAL ERROR [56319]
Say for example you are preparing to upgrade to 11.2 from 10.2. After a successful upgrade and running on 11.2 for a few days you take a new backup of the 11.2 database. You want to know if run into a problem with 11.2 if you could restore the 11.2 backup to 10.2 on another host (or reinstall 10.2 on the same host then restore the 11.2 backup).
Such a restore is possible if the COMPATIBLE parameter had never been increased after the upgrade. In this example, if the 11.2 database had always been run with COMPATIBLE=10.2 then it is possible to restore a backup of the 11.2 database into a 10.2 instance, then perform the downgrade procedures.
If the 11.2 database 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 need to fall back) is to use the Data Guard rolling upgrade method which involves a transient logical standby database (a primary that temporarily becomes a logical standby just during the upgrade period). After upgrading the standby to new version (and primary still running on old version), you can switchover and verify that upgraded database is working well. If it is not, you can switchback to primary old version.
In general, you cannot restore or duplicate between two different platforms.
Note: Refer to Note 1079563.1 which lists supported mixed platforms and Oracle versions for duplicate/restore/recover.
In versions previous to 10g the only option to migrate from one platform to another was using export / import. With 10g, using the RMAN convert commands, you can cross between platforms using the 10g Cross-Platform Transportable Tablespaces option. For more details review this note:
Note 243304.1 Transportable Tablespaces Across Different Platforms
In version 10.2 and later if the source and target OS are the same endian you may issue a "CONVERT DATABASE" so that datafiles are converted and ready for transport to the destination machine. For more details about "CONVERT DATABASE" 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 to Note 732053.1 for 10.2 and 11.1 procedure to skip non-UNDO containing datafiles during transportable database. This can significantly reduce the overall completion time. Also, note that 11.2 offers SKIP UNNECESSARY DATAFILES option for CONVERT DATABASE, to accomplish this.
If going from 32bit to 64bit, you must also change the wordsize per note 62290.1.
There are also 3rd party applications for migration between platforms such as VERITAS Storage Foundation portable data containers:
http://eval.veritas.com/mktginfo/products/White_Papers/Storage_Server_Management/Portable_Data_Containers_for_Oracle.pdf
(Contact Veritas for information about VERITAS Storage Foundation portable data containers)
Community Discussion
You can directly participate in the Discussion about this article below. The Frame is the interactive live Discussion - not a Screenshot ;-)
NOTE:73431.1
- RMAN Compatibility Matrix
NOTE:62290.1
- Changing between 32-bit and 64-bit Word Sizes
NOTE:1079563.1
- RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support
NOTE:732053.1
- Avoid Datafile Conversion during Transportable Database
NOTE:560417.1
- Recovery Through Upgrade returns ORA-1092 on Open
NOTE:558408.1
- RMAN DUPLICATE / RESTORE a database to a higher patchset
NOTE:1503653.1
- Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)
BUG:1867501
- UNCONTROLLED INTERNAL CONNECTION MAKES PLS-00907, PLS-213 AND VARIOUS
NOTE:149948.1
- IMPORTANT: Set "_SYSTEM_TRIG_ENABLED=FALSE" When Upgrading / Downgrading / Applying Patch Sets
NOTE:183649.1
- How to Migrate 8.1.7.3 RDBMS from a 32-bit to a 64-bit database with Java installed
NOTE:209766.1
- Memory Requirements of Databases Migrated from 32-bit to 64-bit
BUG:1816609
- CONVERTING 32 BIT TO 64 BIT RUNNING UTLIRP.SQL FAILS
NOTE:214242.1
- ORA-600 [17069] While Running utlirp.sql Converting to 8.1.7.4 64-Bit
NOTE:757245.1
- Can you / How to Upgrade RDBMS and Convert From 32-bit to 64-bit Binaries Directly on Linux or Windows based Intel Platforms Using the Database Upgrade Assistant (DBUA)
NOTE:341880.1
- How to Convert a 32-bit Database to 64-bit Database on Linux?
NOTE:386990.1
- DB Conversion: 32 bit --&gt64 Bit Broke OLAP Option
NOTE:548978.1
- How To Change Oracle 11g Wordsize from 32-bit to 64-bit.
NOTE:565773.1
- Remove Invalid OLAP Objects From SYS And OLAPSYS Schemas
NOTE:752986.1
- Database Migration With OS Upgrade On Windows Platform
Abstract
History
Details
Summary
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Oracle Database - Standard Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
This note covers RMAN DUPLICATE, RESTORE, and RECOVER mixed platform support.
Author: Tim Chien
Create Date 31-MAR-2010
Update Date 09-JUN-2010
Mixed platforms are supported for:
+ Active Database DUPLICATE
+ Backup-based DUPLICATE using image copies or backup sets
+ RESTORE and RECOVER using image copies or backup sets
Note that the following platform combinations assume that the source database is created at the same version as the destination database (i.e. was not upgraded from a version prior to that listed in the heading for that combination).
An upgraded database can still have blocks which are dependent on old formats and can elicit compatibility issues. Thus, the database is required to be created at the same version as the destination database and not upgraded from a prior version.
These RMAN commands are ONLY supported for the platform combinations listed in this note and are ONLY relevant for same endian combinations.
If a particular combination is not listed below, you must use other supported migration procedures, such as transportable tablespace/database or Data Pump import/export.
For Oracle Database 10g Release 2 and above releases:
Solaris x86-64 Linux x86-64
HP-PA HP-IA
Windows IA (64-bit) / Windows (64-bit Itanium) Windows 64-bit for AMD / Windows (x86-64)
For Oracle Database 11g Release 1 and above releases (requires minimum 11.1 compatible setting):
Linux Windows
Note: Backup must be cold/consistent backup. I.e. cannot apply redo between Windows and Linux, see:
Restore From Windows To Linux using RMAN Fails ( Note 2003327.1)
NOTE: If you need to rollback a PSU already installed, you may need the rollback files from the source system if the source and target are of different platforms.
For Oracle Database 12g Release 2 and above releases:
New functionality with RMAN backup "for transport" allows transport with backupsets. See the following for details:
Steps to Transport a Database to a Different Platform Using Backup Sets in Chapter 28 of the Database Backup and Recovery User's Guide:
http://docs.oracle.com/database/121/BRADV/rcmxplat.htm#BRADV724
12c How Perform Cross-Platform Database Transport to different Endian Platform with RMAN Backup Sets (Note 2013271.1)
NOTE:2003327.1
- Restore From Windows To Linux using RMAN Fails
NOTE:1508375.1
- Duplicate from Windows to Linux ORA-600 [KTBRCL:CDLC NOT IN CR]
NOTE:13335722.8
- Bug 13335722 - Enhancement to allow RMAN conversion of backups cross-endian cross-platform
NOTE:2013271.1
- 12c How Perform Cross-Platform Database Transport to different Endian Platform with RMAN Backup Sets