- 最后登录
- 2015-1-28
- 在线时间
- 43 小时
- 威望
- 164
- 金钱
- 1327
- 注册时间
- 2011-12-26
- 阅读权限
- 50
- 帖子
- 114
- 精华
- 1
- 积分
- 164
- UID
- 121
|
3#
发表于 2012-8-17 11:08:38
谢谢刘大,是我语法和里头函数位置写错了,现在可以了,谢谢!
但现在又有个问题了,就是有些会重复备份,是什么原因?
如下:我备昨天12-18点,和备18-0点的,在备18-0点时发现二个节点813 510都会又重复备一次,这是什么原因?
这个time是指v$archived_log中COMPLETION_TIME?还是RESETLOGS_TIME? FIRST_TIME ?
RMAN> backup archivelog from time "to_date(to_char(sysdate-1,'yyyy-mm-dd')||' 12:00:00','yyyy-mm-dd hh24:mi:ss')" until time "to_date(to_char(sysdate-1,'yyyy-mm-dd')||' 17:59:59','yyyy-mm-dd hh24:mi:ss')" format '/home/oracle/arch_%d_%T_%u.dat';
Starting backup at 17-AUG-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=813 RECID=1267 STAMP=791494187
input archived log thread=2 sequence=510 RECID=1268 STAMP=791497762
channel ORA_DISK_1: starting piece 1 at 17-AUG-12
channel ORA_DISK_1: finished piece 1 at 17-AUG-12
piece handle=/home/oracle/arch_CRDS3DB_20120817_e3nis4ec.dat tag=TAG20120817T103244 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 17-AUG-12
RMAN> backup archivelog from time "to_date(to_char(sysdate-1,'yyyy-mm-dd')||' 18:00:00','yyyy-mm-dd hh24:mi:ss')" until time "to_date(to_char(sysdate-1,'yyyy-mm-dd')||' 23:59:59','yyyy-mm-dd hh24:mi:ss')" format '/home/oracle/arch_%d_%T_%u.dat';
Starting backup at 17-AUG-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=813 RECID=1267 STAMP=791494187
input archived log thread=2 sequence=510 RECID=1268 STAMP=791497762
input archived log thread=1 sequence=814 RECID=1269 STAMP=791503280
input archived log thread=2 sequence=511 RECID=1272 STAMP=791511127
input archived log thread=1 sequence=815 RECID=1270 STAMP=791511105
channel ORA_DISK_1: starting piece 1 at 17-AUG-12
channel ORA_DISK_1: finished piece 1 at 17-AUG-12
piece handle=/home/oracle/arch_CRDS3DB_20120817_e5nis4f8.dat tag=TAG20120817T103312 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 17-AUG-12
SQL> select thread#,sequence#,to_char(completion_time,'yyyy-mm-dd hh24:mi:ss'),to_char(RESETLOGS_TIME,'yyyy-mm-dd hh24:mi:ss'),to_char(FIRST_TIME,'yyyy-mm-dd hh24:mi:ss') from v$archived_log where (thread#=1 and sequence#=813) or (thread#=2 and sequence#=510);
THREAD# SEQUENCE# TO_CHAR(COMPLETION_ TO_CHAR(RESETLOGS_T
---------- ---------- ------------------- -------------------TO_CHAR(FIRST_TIME,
-------------------
1 813 2012-08-16 19:29:47 2012-03-21 11:18:26 2012-08-16 11:41:21
2 510 2012-08-16 20:29:22 2012-03-21 11:18:26 2012-08-16 11:41:25 |
|