利用rman进行异机还原(目录相同)(三)
arc_20130918_0bok56kj_1_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/backup/arc_20130918_0bok56kj_1_1.bak tag=TAG20130918T090211
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archive log filename=/u02/archivelog/1_35_826383194.dbf thread=1 sequence=35
archive log filename=/u02/archivelog/1_36_826383194.dbf thread=1 sequence=36
unable to find archive log
archive log thread=1 sequence=37
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/18/2013 09:05:45
RMAN-06054: media recovery requesting unknown log: thread 1 seq 37 lowscn 372817
--注:此处报错属于正常现象,因为前面创建的备份非一致性备份
--打开数据库
RMAN> alter database open resetlogs;
database opened
--注:至此,恢复完成。
--下面演示目标库的dbid与原始库的dbid设置的不一致所出现的问题
--关闭数据库
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
--打开数据库到nomount状态
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 734003200 bytes
Fixed Size 1221564 bytes
Variable Size 213912644 bytes
Database Buffers 515899392 bytes
Redo Buffers 2969600 bytes
--rman
[oracle@db02 bdump]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Sep 18 09:10:37 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: orcl (not mounted)
--设置dbid
RMAN> set dbid=546330155
executing command: SET DBID
--还原控制文件
RMAN> restore controlfile from '/u02/backup/ctl_20130918_0cok56kv_1_1.bak';
Starting restore at 18-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/u02/oradata/orcl/control01.ctl
output filename=/u02/oradata/orcl/control02.ctl
output filename=/u02/oradata/orcl/control03.ctl
Finished restore at 18-SEP-13
--打开数据库到mount状态
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 18-SEP-13
Starting implicit crosscheck backup at 18-SEP-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/18/2013 09:12:30
RMAN-12010: automatic channel allocation initialization failed
RMAN-06189: current DBID 546330155 does not match target mounted database (1354163930)
--注:这里还原数据库的时候报错。