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

2015-01-22 21:28:33 · 作者: · 浏览: 46
:25:22 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ORCL (DBID=1393903281) RMAN> RMAN> RMAN> RMAN> list backup of database; using target database control file instead of recovery catalog List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 1 Full 593.46M DISK 00:00:38 12-DEC-14 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20141212T161015 Piece Name: /home/oracle/bak/full_orcl_01pq07r8_1_1 List of Datafiles in backup set 1 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/system01.dbf 2 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/undotbs01.dbf 3 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/sysaux01.dbf 4 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/users01.dbf 5 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/example01.dbf 6 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/system02.dbf 7 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/undotbs02.dbf 8 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/sysaux02.dbf 9 Full 645792 12-DEC-14 /home/oracle/oradata/orcl/ex.dbf RMAN> exit Recovery Manager complete. [oracle@ora1 ~]$ pwd /home/oracle [oracle@ora1 ~]$ cd bak [oracle@ora1 bak]$ ls diag.log full_orcl_01pq07r8_1_1 full_orcl_02pq07sn_1_1 [oracle@ora1 bak]$ MAN> BACKUP ARCHIVELOG ALL format '/home/oracle/bak/%U'; Starting backup at 12-DEC-14 current log archived using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=144 devtype=DISK channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=2 recid=1 stamp=866131136 input archive log thread=1 sequence=3 recid=2 stamp=866131686 input archive log thread=1 sequence=4 recid=3 stamp=866137581 channel ORA_DISK_1: starting piece 1 at 12-DEC-14 channel ORA_DISK_1: finished piece 1 at 12-DEC-14 piece handle=/home/oracle/bak/03pq0dg5_1_1 tag=TAG20141212T174638 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:04:31 Finished backup at 12-DEC-14

####在目标库主机上通过RMAN恢复源库

把备份集cp到目标主机上面,并在目标主机上面恢复数据库

修改spfile中的参数:*.diagnostic_dest='/home/oracle',并把background_dump_dest、core_dump_dest等参数去掉,因为在11G中已经不用这些参数了。
[oracle@ora11 bak]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Dec 11 17:27:18 2014

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

connected to target database: ORCL (not mounted)

RMAN> set DBID=1393903281;

executing command: SET DBID

RMAN> restore controlfile from '/home/oracle/bak/full_orcl_02pq07sn_1_1';

Starting restore at 11-DEC-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=/home/oracle/oradata/orcl/control01.ctl
output file name=/home/oracle/oradata/orcl/control02.ctl
output file name=/home/or