刚刚在进行RAC环境的DUPLICATE DATABASE的时候,就碰到了很多问题,由于二者命令比较相似,本来认为这次不会碰到太多的问题,没有想到的是,这次碰到的问题居然比DUPLICATE碰到的问题多出一倍。而且基本上所有碰到的问题都是DUPLICATE操作时不曾遇到的。
bash-3.00$ rman target sys/test@rac11gauxiliary sys/test@rac11g1_s
Recovery Manager: Release 11.1.0.6.0 - Production on Tue Sep 9 17:38:58 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: RAC11G(DBID=1712482917)
connected to auxiliary database: RAC11GS (not mounted)
RMAN> run
2> {
3> allocate channel c1 device type disk connect sys/test@rac11g1;
4> allocate channel c2 device type disk connect sys/test@rac11g2;
5> allocate auxiliary channel ac1 device type disk connect sys/test@rac11g1_s;
6> allocate auxiliary channel ac2 device type disk connect sys/test@rac11g1_s;
7> duplicate target database for standby
8> dorecover
9> from active database;
10> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=621 instance=rac11g1 device type=DISK
allocated channel: c2
channel c2: SID=236 instance=rac11g2 device type=DISK
allocated channel: ac1
channel ac1: SID=658 instance=rac11g1 device type=DISK
allocated channel: ac2
channel ac2: SID=307 instance=rac11g1 device type=DISK
Starting Duplicate Db at 09-SEP-08
contents of Memory Script.:
{
backup as copy reuse
file '/data/oracle/product/11.1/database/dbs/orapwrac11g2' auxiliary format
'/data/oracle/product/11.1/database/dbs/orapwrac11g1' ;
}
executing Memory Script
Starting backup at 09-SEP-08
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 09/09/2008 17:39:16
RMAN-03015: error occurred in stored script. Memory Script
RMAN-03009: failure of backup command on c1 channel at 09/09/2008 17:39:16
ORA-19505: failed to identify file "/data/oracle/product/11.1/database/dbs/orapwrac11g2"
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
RMAN> exit
Recovery Manager complete.
这个错误前面已经提到了,是由于连接到RAC的不同实例造成的,第一次采用了在本地创建一个orapwrac11g2的链接,指向裸设备上的密码问题。由于Oracle读取裸设备上面的密码文件错误,所以前面删除了两个链接,并将裸设备上面的密码文件拷贝到本地。因此这个错误又重现了,下面直接使用RAC11G1服务名,连接指定的实例,从根本上避免这个错误的产生:
bash-3.00$ rman target sys/test@rac11g1 auxiliary sys/test@rac11g1_s
Recovery Manager: Release 11.1.0.6.0 - Production on Tue Sep 9 17:40:41 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: RAC11G(DBID=1712482917)
connected to auxiliary database: RAC11GS (not mounted)
RMAN> run
2> {
3> allocate channel c1 device type disk connect sys/test@rac11g1;