Oracle RMAN cross-platform recovery test (Windows-& gt; Linux)

Source: Internet
Author: User

The original database is Oracle11G 11.2.0.3 and runs on 64-bit WINDOWS. It uses RMAN for a backup and uploads the backup file to the/home/oracle/rmanbackup directory on the Linux server, prepare to recover to 64-bit LINUX. The procedure is as follows:

Start the database to the nomount status

Oracle @ changeme: ~> Sqlplus/nolog
SQL> conn/as sysdba
SQL> startup nomount
SQL> exit

Start RMAN for recovery

Oracle @ changeme: ~> Rman target/

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

Copyright (c) 1982,201 1, 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 category type disk;
3> recover database;
4> release channel restart;
5>}

Allocated channel: allocated
Channel identifier: SID = 134 device type = DISK

Starting recover at 29-JUN-13

Starting media recovery

Channel failed: starting archived log restore to default destination
Channel operated: restoring archived log
Archived log thread = 1 sequence = 18
Channel operated: restoring archived log
Archived log thread = 1 sequence = 19
Channel Layout: reading from backup piece/home/oracle/rmanbackup/ARCH_0GODDSKM_20130629
Channel Layout: piece handle =/home/oracle/rmanbackup/ARCH_0GODDSKM_20130629 tag = ARCH
Channel priority: restored backup piece 1
Channel completed: 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: released
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of recover command at 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/login _. 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 'transactional managed index Block', data object #70514
ORA-00600: internal error code, arguments: [6122], [0], [41668], [0], [], [], [], [], [], [], [], [], []

An error occurred during the final recover phase. It turns out that on ORALCE 11.2.0.3, the database cannot directly restore the RMAN backup from WINDOWS to LINUX, probably because it is similar to BUG 13104881 in Data Guard, cross-platform redo issues.

It is said that it can be recovered from LINUX to WINDOWS. If you are interested, try it.

Notes When backing up a tablespace named 'test' in Oracle RMAN

Oracle RMAN-based incomplete recovery (incomplete recovery by RMAN)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.