最近在研究rac归档备份的情况:
我的测数据库是搭建的虚拟机,2个节点
rac1 节点
log_archive_dest_1 string LOCATION=/home/oracle/rac1archivelog
log_archive_dest_10 string
log_archive_dest_2 string service=orcl2
rac2节点
log_archive_dest_1 string LOCATION=/home/oracle/rac2archivelog
log_archive_dest_10 string
log_archive_dest_2 string service=orcl1
现在我查找 select name from V$archived_log 得到如下的结果
NAME
--------------------------------------------------------------------------------
/home/oracle/rac2archivelog/1_37_696960661.dbf
/home/oracle/rac2archivelog/2_35_696960661.dbf
/home/oracle/rac1archivelog/1_38_696960661.dbf
/home/oracle/rac2archivelog/2_36_696960661.dbf
/home/oracle/rac1archivelog/1_39_696960661.dbf
/home/oracle/rac1archivelog/1_40_696960661.dbf
/home/oracle/rac1archivelog/2_37_696960661.dbf
/home/oracle/rac2archivelog/2_38_696960661.dbf
/home/oracle/rac1archivelog/1_41_696960661.dbf
/home/oracle/rac2archivelog/1_40_696960661.dbf
/home/oracle/rac1archivelog/2_38_696960661.dbf
/home/oracle/rac2archivelog/2_37_696960661.dbf
NAME
--------------------------------------------------------------------------------
/home/oracle/rac2archivelog/1_41_696960661.dbf
/home/oracle/rac1archivelog/1_42_696960661.dbf
/home/oracle/rac2archivelog/2_39_696960661.dbf
/home/oracle/rac1archivelog/2_39_696960661.dbf
/home/oracle/rac2archivelog/1_42_696960661.dbf
可以看到归档都备份到了远端的机器上了
然后我在主机rac1上运行
RMAN> run{
allocate channel c1 device type disk format '/home/oracle/rac1rmanback/%U' connect sys/oracle@orcl1;
allocate channel c2 device type disk format '/home/oracle/rac2rmanback/%U' connect sys/oracle@orcl2;
backup archivelog all;
}
RMAN> list backup of archivelog all;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
53 12.07M DISK 00:00:04 07-SEP-11
BP Key: 53 Status: AVAILABLE Compressed: NO Tag: TAG20110907T171757
Piece Name: /home/oracle/rac1rmanback/1lmlvci7_1_1
List of Archived Logs in backup set 53
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 38 612244 01-SEP-11 663696 02-SEP-11
1 39 663696 02-SEP-11 690023 07-SEP-11
2 40 693823 07-SEP-11 695124 07-SEP-11
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
54 12.66M DISK 00:00:07 07-SEP-11
BP Key: 54 Status: AVAILABLE Compressed: NO Tag: TAG20110907T171757
Piece Name: /home/oracle/rac2rmanback/1mmlvcle_1_1
List of Archived Logs in backup set 54
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 37 609453 01-SEP-11 612244 01-SEP-11
1 40 690023 07-SEP-11 691498 07-SEP-11
1 41 691498 07-SEP-11 691899 07-SEP-11
1 42 691899 07-SEP-11 693821 07-SEP-11
1 43 693821 07-SEP-11 695119 07-SEP-11
2 35 609456 01-SEP-11 612249 01-SEP-11
2 36 612249 01-SEP-11 643675 01-SEP-11
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
55 1.30M DISK 00:00:01 07-SEP-11
BP Key: 55 Status: AVAILABLE Compressed: NO Tag: TAG20110907T171757
Piece Name: /home/oracle/rac2rmanback/1nmlvclm_1_1
List of Archived Logs in backup set 55
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
2 37 643675 01-SEP-11 691528 07-SEP-11
2 38 691528 07-SEP-11 691897 07-SEP-11
2 39 691897 07-SEP-11 693823 07-SEP-11
奇怪的是thread 1的seq 为 41,42,43 为什么备份到了rac2上,但是没有备份到rac1上呢?
运行完后我再去查 select name from V$archived_log 看到如下:
/home/oracle/rac1archivelog/1_40_696960661.dbf
/home/oracle/rac1archivelog/2_37_696960661.dbf
/home/oracle/rac1archivelog/1_41_696960661.dbf
/home/oracle/rac1archivelog/2_38_696960661.dbf
NAME
--------------------------------------------------------------------------------
/home/oracle/rac1archivelog/1_42_696960661.dbf
/home/oracle/rac1archivelog/2_39_696960661.dbf
/home/oracle/rac1archivelog/1_43_696960661.dbf
/home/oracle/rac2archivelog/2_40_696960661.dbf
想问为啥这些归档没有被删除呢?
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8497396/viewspace-748672/,如需转载,请注明出处,否则将追究法律责任。