当前位置:  数据库>oracle

Oracle RMAN 跨平台恢复测试(Windows->Linux)

    来源: 互联网  发布时间:2017-05-24

    本文导语: 原数据库为Oracle11G 11.2.0.3,跑在64位WINDOWS上,使用RMAN做了个备份,将备份文件上传到Linux服务器上的/home/oracle/rmanbackup目录中,准备恢复到64位LINUX上,过程如下: 将数据库启动到nomount状态 oracle@changeme:~> sqlplus /nologSQL> conn / as sys...

原数据库为Oracle11G 11.2.0.3,跑在64位WINDOWS上,使用RMAN做了个备份,将备份文件上传到Linux服务器上的/home/oracle/rmanbackup目录中,准备恢复到64位LINUX上,过程如下:

将数据库启动到nomount状态

oracle@changeme:~> sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount
SQL> exit

进入RMAN进行恢复

oracle@changeme:~> rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Jun 29 17:39:40 2013

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

connected to target database: CSDB (not mounted)

RMAN> set DBID=3039653104

executing command: SET DBID


RMAN> restore controlfile from '/home/oracle/rmanbackup/CTL_0FODDSB1_20130629';

Starting restore at 29-JUN-13
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/csdb/control01.ctl
Finished restore at 29-JUN-13

RMAN> sql 'alter database mount';

sql statement: alter database mount
released channel: ORA_DISK_1

RMAN> catalog start with '/home/oracle/rmanbackup';

Starting implicit crosscheck backup at 29-JUN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 29-JUN-13

Starting implicit crosscheck copy at 29-JUN-13
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 29-JUN-13

searching for all files in the recovery area
cataloging files...
no files cataloged

searching for all files that match the pattern /home/oracle/rmanbackup

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/rmanbackup/ARCH_0GODDSKM_20130629
File Name: /home/oracle/rmanbackup/DB_INC0_0DODDS85_20130629
File Name: /home/oracle/rmanbackup/CTL_0FODDSB1_20130629
File Name: /home/oracle/rmanbackup/DB_INC0_0EODDSAQ_20130629

Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/rmanbackup/ARCH_0GODDSKM_20130629
File Name: /home/oracle/rmanbackup/DB_INC0_0DODDS85_20130629
File Name: /home/oracle/rmanbackup/CTL_0FODDSB1_20130629
File Name: /home/oracle/rmanbackup/DB_INC0_0EODDSAQ_20130629

 

RMAN> run{
2> allocate channel c1 type disk;
3> set newname for datafile 1 to '/u01/app/oracle/oradata/csdb/system01.dbf';
4> set newname for datafile 2 to '/u01/app/oracle/oradata/csdb/sysaux01.dbf';
5> set newname for datafile 3 to '/u01/app/oracle/oradata/csdb/undotbs1.dbf';
6> set newname for datafile 4 to '/u01/app/oracle/oradata/csdb/users01.dbf';
7> set newname for datafile 5 to '/u01/app/oracle/oradata/csdb/example01.dbf';
8> set newname for datafile 6 to '/u01/app/oracle/oradata/csdb/undotbs2.dbf';
9> set newname for datafile 7 to '/u01/app/oracle/oradata/csdb/testtbs01.dbf';
10> restore database;
11> switch datafile all;
12> release channel c1;
13> }

released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=134 device type=DISK

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 29-JUN-13

channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to /u01/app/oracle/oradata/csdb/system01.dbf
channel c1: restoring datafile 00002 to /u01/app/oracle/oradata/csdb/sysaux01.dbf
channel c1: restoring datafile 00003 to /u01/app/oracle/oradata/csdb/undotbs1.dbf
channel c1: restoring datafile 00004 to /u01/app/oracle/oradata/csdb/users01.dbf
channel c1: restoring datafile 00005 to /u01/app/oracle/oradata/csdb/example01.dbf
channel c1: restoring datafile 00006 to /u01/app/oracle/oradata/csdb/undotbs2.dbf
channel c1: restoring datafile 00007 to /u01/app/oracle/oradata/csdb/testtbs01.dbf
channel c1: reading from backup piece /home/oracle/rmanbackup/DB_INC0_0DODDS85_20130629
channel c1: piece handle=/home/oracle/rmanbackup/DB_INC0_0DODDS85_20130629 tag=DB_INCR0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:25
Finished restore at 29-JUN-13

datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=16 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=17 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/undotbs1.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=18 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=19 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/example01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/undotbs2.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=21 STAMP=819395669 file name=/u01/app/oracle/oradata/csdb/testtbs01.dbf

released channel: c1

RMAN> run{
2> allocate channel ch1 type disk;
3> recover database;
4> release channel ch1;
5> }

allocated channel: ch1
channel ch1: SID=134 device type=DISK

Starting recover at 29-JUN-13

starting media recovery

channel ch1: starting archived log restore to default destination
channel ch1: restoring archived log
archived log thread=1 sequence=18
channel ch1: restoring archived log
archived log thread=1 sequence=19
channel ch1: reading from backup piece /home/oracle/rmanbackup/ARCH_0GODDSKM_20130629
channel ch1: piece handle=/home/oracle/rmanbackup/ARCH_0GODDSKM_20130629 tag=ARCH
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/oracle/fast_recovery_area/CSDB/archivelog/2013_06_29/o1_mf_1_18_8wxctd6k_.arc thread=1 sequence=18
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/29/2013 17:56:31
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/u01/app/oracle/fast_recovery_area/CSDB/archivelog/2013_06_29/o1_mf_1_18_8wxctd6k_.arc'
ORA-10562: Error occurred while applying redo to data block (file# 2, block# 70876)
ORA-10564: tablespace SYSAUX
ORA-01110: data file 2: '/u01/app/oracle/oradata/csdb/sysaux01.dbf'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 70514
ORA-00600: internal error code, arguments: [6122], [0], [41668], [0], [], [], [], [], [], [], [], []

在最后recover阶段出错,结果证明,在ORALCE 11.2.0.3上,数据库不可以直接将RMAN备份直接从WINDOWS上恢复到LINUX,原因大概类似于Data Guard中的BUG 13104881,跨平台时的redo问题。

据说从LINUX到WINDOWS可以恢复,有兴趣的朋友可以试试。

相关阅读:

Oracle RMAN中备份表空间名为'TEST'时需要注意的问题

Oracle 基于 RMAN 的不完全恢复(incomplete recovery by RMAN)


    
 
 

您可能感兴趣的文章:

  • Oracle数据库恢复后心得
  • 关于系统重装后Oracle数据库完全恢复的解决办法
  • oracle drop table(表)数据恢复方法
  • Oracle数据库备份和恢复工具 RMan
  • oracle备份恢复的具体方法
  • oracle中误删除表后恢复语句(FLASHBACK)
  • oracle冷备份恢复和oracle异机恢复使用方法
  • 在Oracle 10gR2中设定指定的恢复点实现轻松闪回
  • Oracle重做日志文件损坏或丢失后的恢复
  • Oracle11g备份和恢复功能的提高
  • 实战Oracle数据库备份与恢复
  • Oracle数据库冷备份的异地恢复
  • oracle下实现恢复一个丢失的数据文件的代码
  • 详解通过Backup Exec来实施Oracle灾难恢复
  • Oracle的恢复管理器及DBMS_JOB包分析
  • Oracle数据库文件恢复以及备份思路
  • Oracle数据库备份恢复最佳实践
  • oracle如何恢复被覆盖的存储过程
  • rman恢复方案和oracle异机恢复
  • oracle数据库创建备份与恢复脚本整理
  • windows上要装什么软件才能管理到linux上的oracle?
  • linux中没有装X-Windows如何安装oracle9i
  • 求助:如何在UNIX下访问已经在WINDOWS下安装好的ORACLE?
  • windows通过TCP/IP怎么连接到solaris上的oracle?
  • 请教高手: linux c如何远程访问windows下的oracle数据库?
  • windows下通过ie访问不到linux环境下的oracle em
  • windows怎么连接到solaris上的oracle?
  • Linux做web服务器JDBC连接windows下的Oracle问题
  • 调查服务器系统BSD,SCO,Linux,windows?和数据库mysql,oracle,sqlserver?
  • 在linux(red hat 9.0)下可以直接安装windows版本的oracle8.17可以吗??
  • windows server 2003 sp1下.net 3.5(Oracle 9.2)环境配置
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 测试添加Oracle中Blob数据类型对象
  • Oracle融合中间件在Dell服务器上测试创世界纪录
  • oracle group by语句实例测试
  • 三招助你做好Oracle数据库备份测试
  • Oracle Dataguard备库失败与主库响应测试
  • oracle 使用递归的性能提示测试对比
  • oracle 11g 设置用户密码大小写敏感测试
  • oracle—SQL技巧之(一)连续记录查询sql案例测试
  • Oracle数据库异步调用基本原理及测试
  • oracle存储过程中return和exit区别概述及测试
  • 知识进阶 完全了解 Oracle 标签安全测试
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • ORACLE日期相关操作
  • Linux系统下Oracle的启动与Oracle监听的启动
  • ORACLE数据库常用字段数据类型介绍
  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,