zyclove201305 发表于 2017-8-30 18:57:25

归档日志备份和删除,其时间指定问题

本帖最后由 zyclove201305 于 2017-8-30 18:57 编辑

我用 RMAN 备份归档日志, 我想备份昨天到现在的产生的归档日志对应的日志文件,但发现少备份了一个日志文件,如下:
RMAN> run {
2> allocate channel c1 device type disk format '/oradata/orabak/arc_%T_%U.bak' connect sys/"xxxxx"@yundb_1;
3> sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
4> backup archivelog from time 'sysdate-1';
5> release channel c1;
6> }

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=1151 device type=DISK

sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT

Starting backup at 30-AUG-17
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=911 RECID=854 STAMP=953330446
input archived log thread=1 sequence=912 RECID=855 STAMP=953342403
input archived log thread=1 sequence=913 RECID=856 STAMP=953342403
input archived log thread=1 sequence=914 RECID=857 STAMP=953397819
input archived log thread=1 sequence=915 RECID=858 STAMP=953402108
input archived log thread=1 sequence=916 RECID=859 STAMP=953402108
channel c1: starting piece 1 at 30-AUG-17
channel c1: finished piece 1 at 30-AUG-17
piece handle=/oradata/orabak/arc_20170830_tmsd7gns_1_1.bak tag=TAG20170830T175508 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 30-AUG-17

released channel: c1

少了一个归档日志文件:1_910_931629588.dbf
我用logMiner 查看了该日志文件的内容,发现有昨天产生的日志,如下:
begin
sys.dbms_logmnr.add_logfile(logfilename => '/oradata/arch/1_910_931629588.dbf',options => dbms_logmnr.new);
sys.dbms_logmnr.start_logmnr(options => sys.dbms_logmnr.dict_from_online_catalog);
end;

能过 backup archivelog from time 'sysdate-1'; 备份,我的理解是备份昨天产生的归档日志对应的日志文件, 1_910_931629588.dbf 这个日志文件既然有昨天产生的日志,那么就应该备份下来,但为什么没有备份呢,请指点。

Liu Maclean(刘相兵 发表于 2017-8-31 15:21:59

可以参考这篇文章的诊断过程:
http://www.askmaclean.com/archives/archivelog-completed-before-vs-until-time.html

zyclove201305 发表于 2017-8-31 15:40:16

好的,谢谢
页: [1]
查看完整版本: 归档日志备份和删除,其时间指定问题