ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Oracle数据库DBA高级工程师培训视频
Oracle数据库培训-备份恢复-性能优化-集群容灾
mysql数据库视频教程

Oracle RAC数据库在裸设备下的备份过程

内容发布:paulyi| 发布时间:2014-1-25 13:50:11
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>




上一篇:Oracle数据库的远程复制与异地容灾的经典解析
下一篇:Oracle RAC数据库在裸设备下的恢复
回复

使用道具 举报

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

本版积分规则

快速回复 返回顶部 返回列表