实战:Oracle10.2.0.4异机迁移并升级到Oracle 11.2.0.4(六)

2015-01-21 12:18:09 · 作者: · 浏览: 28
_DISK_1: restoring datafile 00008 to /home/oracle/oradata/orcl/sysaux02.dbf
channel ORA_DISK_1: restoring datafile 00009 to /home/oracle/oradata/orcl/ex.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/bak/full_orcl_01pq07r8_1_1
channel ORA_DISK_1: piece handle=/home/oracle/bak/full_orcl_01pq07r8_1_1 tag=TAG20141212T161015
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:45
Finished restore at 11-DEC-14

RMAN>

alter日志
Completed: alter database mount
Thu Dec 11 17:29:16 2014
Checker run found 10 new persistent data failures
Thu Dec 11 17:32:38 2014
Full restore complete of datafile 6 /home/oracle/oradata/orcl/system02.dbf.? Elapsed time: 0:03:21
? checkpoint is 645792
Full restore complete of datafile 8 /home/oracle/oradata/orcl/sysaux02.dbf.? Elapsed time: 0:03:25
? checkpoint is 645792
Full restore complete of datafile 7 /home/oracle/oradata/orcl/undotbs02.dbf.? Elapsed time: 0:03:25
? checkpoint is 645792
Full restore complete of datafile 9 /home/oracle/oradata/orcl/ex.dbf.? Elapsed time: 0:03:25
? checkpoint is 645792
Full restore complete of datafile 4 /home/oracle/oradata/orcl/users01.dbf.? Elapsed time: 0:00:01
? checkpoint is 645792
Thu Dec 11 17:32:49 2014
Full restore complete of datafile 2 /home/oracle/oradata/orcl/undotbs01.dbf.? Elapsed time: 0:03:35
? checkpoint is 645792
? last deallocation scn is 642787
Thu Dec 11 17:33:08 2014
Full restore complete of datafile 5 /home/oracle/oradata/orcl/example01.dbf.? Elapsed time: 0:03:50
? checkpoint is 645792
? last deallocation scn is 617217
Thu Dec 11 17:33:38 2014
Full restore complete of datafile 3 /home/oracle/oradata/orcl/sysaux01.dbf.? Elapsed time: 0:04:22
? checkpoint is 645792
? last deallocation scn is 635554
Thu Dec 11 17:33:55 2014
Full restore complete of datafile 1 /home/oracle/oradata/orcl/system01.dbf.? Elapsed time: 0:04:38
? checkpoint is 645792
? last deallocation scn is 637323
Thu Dec 11 17:36:53 2014
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.


RMAN> recover database;

Starting recover at 11-DEC-14
using channel ORA_DISK_1

starting media recovery

unable to find archived log
archived log thread=1 sequence=4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/11/2014 17:38:01
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 4 and starting SCN of 645792

====需要指定具体的序列号,同时把源库的归档备份注册进来。
RMAN> CATALOG BACKUPPIECE '/home/oracle/bak/03pq0dg5_1_1';

cataloged backup piece
backup piece handle=/home/oracle/bak/03pq0dg5_1_1 RECID=2 STAMP=866051762

RMAN> run {
set until scn? 645792;
recover database;
}2> 3> 4>

executing command: SET until clause

Starting recover at 11-DEC-14
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:02

Finished recover at 11-DEC-14

RMAN>

RMAN>

RMAN>


===如果有数据库连的话,要提前生成SQL语句,恢复完成后,在新库上重建一下。
SELECT
'create '||DECODE(U.NAME,'PUBLIC','public ')||'database link '||CHR(10)
||DECODE(U.NAME,'PUBLIC