【问题标题】:Restoring RMAN Oracle 10g Backup in Oracle 11g在 Oracle 11g 中恢复 RMAN Oracle 10g 备份
【发布时间】:2012-07-29 00:10:24
【问题描述】:

我有 Sun Solaris 操作系统上的 oracle 10g (10.2.0.3) 的 RMAN 完整数据库备份,我想在 Linux 操作系统上的 oracle 11g (11.2.0.3) 上恢复它。备份片以二进制模式手动传输到 oracle 11g 服务器。 Oracle 11g 安装在 Linux 操作系统上。我只有 RMAN 备份,无法访问从中进行备份的主数据库。

-rwxrwxr-x 1 mepc dba   36356096 Jul 16 14:49 snapcf_MEPC.f
-rwxrwxr-x 1 mepc dba  166028800 Jul 16 15:29 MEPC_full_backup_MEPC_nnnbkn9f_1_1
-rwxrwxr-x 1 mepc dba  169567744 Jul 16 15:29 MEPC_full_backup_MEPC_nmnbkn9f_1_1
-rwxrwxr-x 1 mepc dba  164813824 Jul 16 15:39 MEPC_full_backup_MEPC_nonbkn9f_1_1
-rwxrwxr-x 1 mepc dba  144025600 Jul 16 16:06 MEPC_full_backup_MEPC_nqnbkn9f_1_1
-rwxrwxr-x 1 mepc dba  168576512 Jul 16 16:09 MEPC_full_backup_MEPC_npnbkn9f_1_1
-rwxrwxr-x 1 mepc dba  168649216 Jul 16 17:33 MEPC_full_backup_MEPC_o5nbkpvv_1_1
-rwxrwxr-x 1 mepc dba  162847232 Jul 16 17:34 MEPC_full_backup_MEPC_o6nbkpvv_1_1
-rwxrwxr-x 1 mepc dba  167351808 Jul 16 17:35 MEPC_full_backup_MEPC_o7nbkpvv_1_1
-rwxrwxr-x 1 mepc dba  166838272 Jul 16 17:36 MEPC_full_backup_MEPC_o8nbkpvv_1_1
-rwxrwxr-x 1 mepc dba  166876160 Jul 16 17:37 MEPC_full_backup_MEPC_o9nbkpvv_1_1
-rwxrwxr-x 1 mepc dba  327606272 Jul 16 17:54 MEPC_full_backup_MEPC_o4nbknav_1_1
-rwxrwxr-x 1 mepc dba  549658624 Jul 16 18:26 MEPC_full_backup_MEPC_o2nbknav_1_1
-rwxrwxr-x 1 mepc dba  162984448 Jul 16 18:28 MEPC_full_backup_MEPC_oanbkpvv_1_1
-rwxrwxr-x 1 mepc dba  163567616 Jul 16 18:29 MEPC_full_backup_MEPC_obnbkpvv_1_1
-rwxrwxr-x 1 mepc dba  161380352 Jul 16 18:29 MEPC_full_backup_MEPC_ocnbkpvv_1_1
-rwxrwxr-x 1 mepc dba 1072275456 Jul 18 13:52 MEPC_full_backup_MEPC_o3nbknav_1_1
-rwxrwxr-x 1 mepc dba 1813348352 Jul 18 17:00 MEPC_full_backup_MEPC_o1nbknav_1_1
-rwxrwxr-x 1 mepc dba   36438016 Jul 25 15:45 controlfile_bkup_MEPC_c-1469445140-20120522-09

备份采用上述格式。我知道从中进行备份的数据库的 ORACLE_SID 和 did。

每当我尝试以下命令时

mepc@tcstctmatson:/mepc_backup/May22fullbkp$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jul 31 12:14:54 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: MEPC (DBID=1595278680)

RMAN> shutdown;
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)
Oracle instance started

Total System Global Area    1071333376 bytes

Fixed Size                     1349732 bytes
Variable Size                620758940 bytes
Database Buffers             444596224 bytes
Redo Buffers                   4628480 bytes

RMAN> restore spfile to '$ORACLE_HOME/dbs/initMEPC.ora' from autobackup db_recovery_file_dest='/mepc_backup/May22fullbkp' db_name='MEPC';

以下错误被通知

Starting restore at 31-JUL-12
using channel ORA_DISK_1

recovery area destination: /mepc_backup/May22fullbkp
database name (or database unique name) used for search: MEPC
channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120731
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120730
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120729
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120728
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120727
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120726
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120725
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/31/2012 12:22:06
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

我也尝试通过目录恢复 rman 备份,并通知以下错误

List of Files Which Where Not Cataloged
=======================================
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_nonbkn9f_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_obnbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_ocnbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o7nbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o9nbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_nmnbkn9f_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_nnnbkn9f_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o3nbknav_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o6nbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/controlfile_bkup_MEPC_c-1469445140-20120522-09
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_npnbkn9f_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_oanbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_nqnbkn9f_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o1nbknav_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o5nbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/snapcf_MEPC.f
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o2nbknav_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o4nbknav_1_1
  RMAN-07517: Reason: The file header is corrupted
File Name: /mepc_backup/May22fullbkp/MEPC_full_backup_MEPC_o8nbkpvv_1_1
  RMAN-07517: Reason: The file header is corrupted

文件没有损坏,因为我检查了两台服务器上的校验和,它是相同的。

请帮助我如何在 Oracle 11g 中恢复 RMAN oracle 10g 备份,并告诉我哪里出错了。

提前致谢。

【问题讨论】:

    标签: oracle backup oracle11gr2 rman oracle-dump


    【解决方案1】:

    你不能这样做。 AFAIK,Solaris - 假设 sparc - 和 Linux - 假设 Intel - 具有不同的字节序格式,这是你的问题。您可以使用迁移跨平台表空间方案。 见Oracle® Database Backup and Recovery Reference 如果您的 endian 格式确实看起来相同,则应使用 rman convert database 转换数据库。在这种情况下,您可以恢复跨平台和跨版本。

    【讨论】:

    • 两个数据库的字节序格式如下 Platform_name Endian_Format Source Solaris[tm] OE (64-bit) Big Target Linux IA (32-bit) Little 根据您提供的链接,它说我们可以转换表空间、数据文件、数据库的字节序格式。我们如何转换目标数据库中 RMAN 备份的字节序格式。我尝试执行此命令(使用正确的语法)但如果失败。 convert controlfile RMAN BACKUP control file DB FILE NAME CONVERT RMAN BACKUP control file from platform Solaris tm OE 64-bit 提前致谢。
    • 按照我的阅读方式,你应该在源服务器上准备这个。目前我没有 sparc 运行测试,但阅读文档中写的内容,仔细阅读。
    • 我只能访问 RMAN Oracle 10g 备份片段。此备份通过二进制模式手动移动到 linux 上的 oracle 11g 服务器。这就是为什么我试图在目标数据库中转换字节序格式。好吧,我正在阅读文档并试图找到合适的出路。请建议还需要做什么。提前致谢。
    【解决方案2】:

    不适用于 10g/11g,但这在 12c 中有所不同:

    在 12c 中,rman 通过备份命令提供以下选项:

    FOR TRANSPORT:此选项创建一个可以传输到任何目的地的备份集。如果目标数据库使用与源不同的字节序格式,则在目标数据库上执行字节序格式转换。 TO PLATFORM:此选项导致在源数据库上执行字节序格式转换,并且只能由该支持的平台使用。 DATAPUMP:这指定在执行跨平台备份时创建数据泵导出转储文件。转储文件是在单独的备份集中创建的。

    【讨论】:

      【解决方案3】:

      使用以下命令从自动备份恢复,RMAN 知道路径,它会恢复。

      restore controlfile from autobackup;
      

      您首先需要知道从 Solaris 到 Linux 是否属于同一字节序。我看到 Solaris 64 但和 Linux 64 位是相同的字节序。

      即使它具有相同的字节序,当“源生产数据库具有 32KB 表空间和为 db_32k_cache_size 定义的初始化参数,但目标 pfile 没有定义参数 db_​​32k_cache_size”时,您也会看到此错误

      在目标db_32k_cache_size的pfile/spfile中设置

      【讨论】:

        猜你喜欢
        • 2010-11-28
        • 1970-01-01
        • 2016-03-13
        • 1970-01-01
        • 2010-09-09
        • 2014-05-28
        • 1970-01-01
        • 2011-01-13
        • 2020-02-25
        相关资源
        最近更新 更多