做RAC的standby时,RMAN恢复数据失败

[复制链接]
查看11 | 回复4 | 2015-7-28 14:26:07 | 显示全部楼层 |阅读模式
在VMware上想要实现oracle9i RAC下的单节点standby
实验环境linux as4安装oracle9i RAC,双节点,使用RAW设备
standby使用单机完成
问题:
将RAC数据库备份完成后,恢复到standby上时,一直不能成功能恢复
1.备份命令
RMAN> sql'alter system archive log current';
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oracle/ora92/backup/%U' connect sys/ora123@ora1;
4> allocate channel c2 device type disk format '/oracle/ora92/backup/%U' connect sys/ora123@ora2;
5> backup database format '/oracle/ora92/backup/arch_%U' plus archivelog delete all input;
6> }
生成备库控制文件
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oracle/ora92/backup/con_%U';
4> backup current controlfile for standby;
5> }
完成以上操作后,得到相应备份文件.考贝至standby机器相同目录下.
2.在使用以下命令进行恢复时报错
[oracle@rac1 raw]$ rman target / auxiliary sys/ora123@standby
RMAN> run
2> {
3> allocate channel c1 device type disk format '/oracle/ora92/backup/%U' connect sys/ora123@ora1;
4> allocate channel c2 device type disk format '/oracle/ora92/backup/%U' connect sys/ora123@ora2;
5> allocate auxiliary channel ac1 device type disk format '/oracle/ora92/backup/%U';
6> allocate auxiliary channel ac2 device type disk format '/oracle/ora92/backup/%U';
7> duplicate target database for standby;
8> }
using target database controlfile instead of recovery catalog
allocated channel: c1
channel c1: sid=24 devtype=DISK
allocated channel: c2
channel c2: sid=22 devtype=DISK
allocated channel: ac1
channel ac1: sid=12 devtype=DISK
allocated channel: ac2
channel ac2: sid=13 devtype=DISK
Starting Duplicate Db at 25-JUN-08
printing stored script: Memory Script
{
restore clone standby controlfile to clone_cf;
replicate clone controlfile from clone_cf;
sql clone 'alter database mount standby database';
}
executing script: Memory Script
Starting restore at 25-JUN-08
controlfile is already restored to file /oracle/ora92/oradata/ora/standby.ctl
restore not done; all files readonly, offline, or already restored
Finished restore at 25-JUN-08
replicating controlfile
input filename=/oracle/ora92/oradata/ora/standby.ctl
sql statement: alter database mount standby database
released channel: c1
released channel: c2
released channel: ac1
released channel: ac2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/25/2008 13:59:31
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /dev/raw/raw37 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw22 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw17 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw13 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw25 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw24 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw40 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw12 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw11 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw32 conflicts with a file used by the target database
RMAN-05001: auxiliary filename /dev/raw/raw31 conflicts with a file used by the target database
试着使用过很多方法,一直没能解决,希望得到帮助.谢谢各位大虾
[ 本帖最后由 cclt2580 于 2008-6-25 15:42 编辑 ]
回复

使用道具 举报

千问 | 2015-7-28 14:26:07 | 显示全部楼层
duplicate target database for standby nofilenamecheck;
试试
回复

使用道具 举报

千问 | 2015-7-28 14:26:07 | 显示全部楼层
这个命令也试过
RMAN> duplicate target database for standby nofilenamecheck;
Starting Duplicate Db at 25-JUN-08
using target database controlfile instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=12 devtype=DISK
printing stored script: Memory Script
{
restore clone standby controlfile to clone_cf;
replicate clone controlfile from clone_cf;
sql clone 'alter database mount standby database';
}
executing script: Memory Script
Starting restore at 25-JUN-08
using channel ORA_AUX_DISK_1
controlfile is already restored to file /oracle/ora92/oradata/ora/standby.ctl
restore not done; all files readonly, offline, or already restored
Finished restore at 25-JUN-08
replicating controlfile
input filename=/oracle/ora92/oradata/ora/standby.ctl
sql statement: alter database mount standby database
printing stored script: Memory Script
{
set until scn747304;
set newname for datafile1 to
"/dev/raw/raw11";
set newname for datafile2 to
"/dev/raw/raw12";
set newname for datafile3 to
"/dev/raw/raw40";
set newname for datafile4 to
"/dev/raw/raw24";
set newname for datafile5 to
"/dev/raw/raw25";
set newname for datafile6 to
"/dev/raw/raw13";
set newname for datafile7 to
"/dev/raw/raw17";
set newname for datafile8 to
"/dev/raw/raw22";
set newname for datafile9 to
"/dev/raw/raw37";
restore
check readonly
clone database
;
}
executing script: Memory Script
executing command: SET until clause
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
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 25-JUN-08
using channel ORA_AUX_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/25/2008 13:57:29
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
回复

使用道具 举报

千问 | 2015-7-28 14:26:07 | 显示全部楼层
我在以上操作的时候做错过什么地方的,请大家多多指出.
被这个问题因扰了很长时间了
回复

使用道具 举报

千问 | 2015-7-28 14:26:07 | 显示全部楼层
mark
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行