ORACLE RMAN 跨平台恢复测试(Windows->Linux)
2013-07-01 01:26
423 查看
原数据库为ORACLE11G 11.2.0.3,跑在64位WINDOWS上,使用RMAN做了个备份,将备份文件上传到Linux服务器上的/home/oracle/rmanbackup目录中,准备恢复到64位LINUX上,过程如下:
将数据库启动到nomount状态
进入RMAN进行恢复
在最后recover阶段出错,结果证明,在ORALCE 11.2.0.3上,数据库不可以直接将RMAN备份直接从WINDOWS上恢复到LINUX,原因大概类似于Data Guard中的BUG 13104881,跨平台时的redo问题。
据说从LINUX到WINDOWS可以恢复,有兴趣的朋友可以试试。
将数据库启动到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可以恢复,有兴趣的朋友可以试试。
相关文章推荐
- 跨平台移植 linux<—>windows
- Windows & Linux 文件格式之迷 < VI下删除文本中的^M>
- 用PXE安装WINDOWS(linux->windows)
- 分享一实战性开源MVC框架<Linux、Windows跨平台开发so easy>
- LinuxSir.Org > 编程开发讨论区 —— LinuxSir.Org > 嵌入式Linux讨论区──实验田版 > 编译microwindows出错..
- Virtualbox主机和虚拟机之间文件夹共享及双向拷贝(Windows<->Windows, Windows<->Linux)
- 用linux装逼->在windows装linux的逼(windows_dev=gvim+mingw+msys+mintty)
- 第一步在Fedora 8下用crosstool-ng建立arm-linux交叉编译环境(TQ2440 S3C2440)--->完结,测试通过
- Windows & Linux 文件格式之迷 < VI下删除文本中的^M>
- linux->windows移植注意事项
- MCAPI学习笔记<一>——简介与Linux下示例程序测试
- Windows & Linux 文件格式之迷 < VI下删除文本中的^M> .
- Windows & Linux 文件格式之迷 < VI下删除文本中的^M>
- 项目移植[ Windows --> Linux/Unix --> AIX/Solaris ]
- 跨平台的目录遍历实现方法(windows和linux已经测试)
- [Sqlite] --> Sqlite于Windows、Linux 和 Mac OS X 在安装过程
- Linux->Windows主机目录和文件名中文乱码恢复
- 拷贝文件:linux--〉windows-->linux,丢失文件权限解决方法
- [Sqlite] --> Sqlite在Windows、Linux 和 Mac OS X 上的安装过程
- Windows & Linux 文件格式之迷 < VI下删除文本中的^M>