oracle rac在裸设备下的备份

     因为归档日志不能放在裸设备上,用以下命令来更改放在本地硬盘上

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=/arch' SID = 'rac1';

系统已更改。

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=/arch' SID = 'rac2';

系统已更改。 

直接用以下命令备份时,备份会报错,因为节点1访问不到节点2的归档

[oracle@rac1 arch]$ rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Sat Jan 3 23:04:18 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: RAC (DBID=2257786532)

RMAN> backup database plus archivelog delete all input;


Starting backup at 03-JAN-09
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=152 instance=rac1 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 01/03/2009 23:04:51
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /arch/2_1_675209275.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

用以下命令就可以了

RMAN> run
2> {
3> allocate channel c1 device type disk format '/oradata/%U' connect sys/abcdefg@rac1;
4> allocate channel c2 device type disk format '/oradata/%U' connect sys/abcdefg@rac2;
5> backup database plus archivelog delete all input;
6> }

released channel: ORA_DISK_1
allocated channel: c1
channel c1: sid=153 instance=rac1 devtype=DISK

allocated channel: c2
channel c2: sid=153 instance=rac2 devtype=DISK


Starting backup at 03-JAN-09
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=54 recid=94 stamp=675209223
input archive log thread=1 sequence=55 recid=97 stamp=675209229
channel c1: starting piece 1 at 03-JAN-09
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=56 recid=99 stamp=675209276
input archive log thread=1 sequence=57 recid=98 stamp=675209276
input archive log thread=2 sequence=42 recid=101 stamp=675209277
input archive log thread=2 sequence=43 recid=100 stamp=675209277
channel c2: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/15k3tric_1_1 tag=TAG20090103T230754 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: deleting archive log(s)
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_1_seq_54.286.675209223 recid=94 stamp=675209223
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_1_seq_55.285.675208733 recid=97 stamp=675209229
channel c2: finished piece 1 at 03-JAN-09
piece handle=/oradata/16k3triu_1_1 tag=TAG20090103T230754 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:06
channel c2: deleting archive log(s)
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_1_seq_56.284.675209277 recid=99 stamp=675209276
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_1_seq_56.283.675208783 recid=96 stamp=675209229
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_1_seq_57.282.675209275 recid=98 stamp=675209276
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_2_seq_42.280.675209277 recid=101 stamp=675209277
archive log filename=+DISKGROUP/rac/archivelog/2009_01_03/thread_2_seq_43.279.675209277 recid=100 stamp=675209277
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=1 recid=102 stamp=675211896
input archive log thread=1 sequence=2 recid=103 stamp=675212034
input archive log thread=1 sequence=3 recid=104 stamp=675212035
input archive log thread=1 sequence=4 recid=106 stamp=675212038
input archive log thread=1 sequence=5 recid=110 stamp=675212153
input archive log thread=1 sequence=6 recid=113 stamp=675212685
input archive log thread=1 sequence=7 recid=115 stamp=675212874
channel c1: starting piece 1 at 03-JAN-09
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=2 sequence=1 recid=105 stamp=675212017
input archive log thread=2 sequence=2 recid=107 stamp=675212131
input archive log thread=2 sequence=3 recid=108 stamp=675212134
input archive log thread=2 sequence=4 recid=109 stamp=675212141
input archive log thread=2 sequence=5 recid=111 stamp=675212143
input archive log thread=2 sequence=6 recid=112 stamp=675212698
input archive log thread=2 sequence=7 recid=114 stamp=675212887
channel c2: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/17k3trij_1_1 tag=TAG20090103T230754 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
channel c1: deleting archive log(s)
archive log filename=/arch/1_1_675209275.dbf recid=102 stamp=675211896
archive log filename=/arch/1_2_675209275.dbf recid=103 stamp=675212034
archive log filename=/arch/1_3_675209275.dbf recid=104 stamp=675212035
archive log filename=/arch/1_4_675209275.dbf recid=106 stamp=675212038
archive log filename=/arch/1_5_675209275.dbf recid=110 stamp=675212153
archive log filename=/arch/1_6_675209275.dbf recid=113 stamp=675212685
archive log filename=/arch/1_7_675209275.dbf recid=115 stamp=675212874
channel c2: finished piece 1 at 03-JAN-09
piece handle=/oradata/18k3trj7_1_1 tag=TAG20090103T230754 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
channel c2: deleting archive log(s)
archive log filename=/arch/2_1_675209275.dbf recid=105 stamp=675212017
archive log filename=/arch/2_2_675209275.dbf recid=107 stamp=675212131
archive log filename=/arch/2_3_675209275.dbf recid=108 stamp=675212134
archive log filename=/arch/2_4_675209275.dbf recid=109 stamp=675212141
archive log filename=/arch/2_5_675209275.dbf recid=111 stamp=675212143
archive log filename=/arch/2_6_675209275.dbf recid=112 stamp=675212698
archive log filename=/arch/2_7_675209275.dbf recid=114 stamp=675212887
Finished backup at 03-JAN-09

Starting backup at 03-JAN-09
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00007 name=/oradata/paul01.dbf
input datafile fno=00003 name=+DISKGROUP/rac/datafile/sysaux.270.669804585
input datafile fno=00005 name=+DISKGROUP/rac/datafile/users.278.672888597
input datafile fno=00002 name=+DISKGROUP/rac/datafile/undotbs1.269.669804571
channel c1: starting piece 1 at 03-JAN-09
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00001 name=+DISKGROUP/rac/datafile/system.268.669804533
channel c2: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/19k3trip_1_1 tag=TAG20090103T230808 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:34
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00004 name=+DISKGROUP/rac/datafile/undotbs2.272.669804611
channel c1: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/1bk3trjr_1_1 tag=TAG20090103T230808 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:04
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00006 name=+DISKGROUP/rac/datafile/test.277.669863437
channel c1: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/1ck3trk0_1_1 tag=TAG20090103T230808 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:06
channel c2: finished piece 1 at 03-JAN-09
piece handle=/oradata/1ak3trjc_1_1 tag=TAG20090103T230808 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:59
Finished backup at 03-JAN-09

Starting backup at 03-JAN-09
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=8 recid=116 stamp=675212956
channel c1: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/1dk3trkt_1_1 tag=TAG20090103T230917 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=/arch/1_8_675209275.dbf recid=116 stamp=675212956
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=2 sequence=8 recid=117 stamp=675212956
channel c1: starting piece 1 at 03-JAN-09
channel c1: finished piece 1 at 03-JAN-09
piece handle=/oradata/1ek3trkv_1_1 tag=TAG20090103T230917 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=/arch/2_8_675209275.dbf recid=117 stamp=675212956
Finished backup at 03-JAN-09

Starting Control File and SPFILE Autobackup at 03-JAN-09
piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/c-2257786532-20090103-01 comment=NONE
Finished Control File and SPFILE Autobackup at 03-JAN-09
released channel: c1
released channel: c2

RMAN>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-526476/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199859/viewspace-526476/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值