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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1902|回复: 0
打印 上一主题 下一主题

[转载] Frequently Asked Questions about Restoring Or Duplicating Between Different V...

[复制链接]
跳转到指定楼层
楼主
发表于 2017-3-31 17:09:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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


Applies to:
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.
Purpose

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
Questions and Answers
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.
1) Can I restore or duplicate my previous version database using a later version of Oracle?
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


2) Can I restore or duplicate between two different patchset levels?
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.

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
3) Can I restore or duplicate between two different versions of the same operating system?
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.

4) Is it possible to restore or duplicate when the bit level (32 bit or 64 bit) of Oracle does not match?
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]
5) Is it possible to restore a later version backup to an earlier version of Oracle?
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.
6) Can I restore or duplicate my RMAN backup between two different platforms such as Solaris to Linux?
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)

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-6 01:37 , Processed in 0.111603 second(s), 20 queries .

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

© 2001-2020

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