Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN: backup archivelog until time 'sysdate-2' delete input

RE: RMAN: backup archivelog until time 'sysdate-2' delete input

From: Roger Xu <roger_xu_at_dp7uptx.com>
Date: Tue, 12 Oct 2004 15:20:38 -0500
Message-ID: <A6801E8A03316A4DA597866F77A013F702D4F1E2@irv2kexch01>


'sysdate -2' is different from what I thought it was! Thanks, Brian. SQL> !date
Tue Oct 12 15:20:40 CDT 2004
SQL> select to_char(sysdate-2,'DD-MON-YYYY HH24:MM:SS') from dual; TO_CHAR(SYSDATE-2,'D



10-OCT-2004 15:10:42
SQL> !date
Tue Oct 12 15:20:45 CDT 2004

-----Original Message-----
From: Spears, Brian [ mailto:BSpears_at_Limitedbrands.com] Sent: Tuesday, October 12, 2004 8:41 AM
To: DWILLIAMS_at_LIFETOUCH.COM; Roger Xu; Oracle-L_at_Freelists. Org (E-mail) Subject: RE: RMAN: backup archivelog until time 'sysdate-2' delete input

I did backup archivelogs to disk Roger. I did find that the same confusion you have found.

I used select to_char(sysdate-2,'DD-MON-YY:HH.MM.SS') from dual; when it was run to make sure it was the time range I expected.

Note: before you do that command ...make sure you do this one..

sql 'alter system archive log current';

Brian

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[ mailto:oracle-l-bounce_at_freelists.org] On Behalf Of DENNIS WILLIAMS Sent: Tuesday, October 12, 2004 8:52 AM
To: roger_xu_at_dp7uptx.com; Oracle-L_at_Freelists. Org (E-mail) Subject: RE: RMAN: backup archivelog until time 'sysdate-2' delete input

Roger - I don't see where you mentioned your Oracle version. RMAN has been notorious for being picky about the date format. I've generally heard of this in terms of recovery times and with Oracle 8i. Since I back up RMAN to disk, I don't use RMAN to backup the archive logs, so I haven't encountered this specific problem. Looking at Freeman's great Oracle9i Backup and Recovery, he uses the syntax:

        'backup archivelog from time 'sysdate - 1';

Dennis Williams
DBA
Lifetouch, Inc.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[ mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of Roger Xu
Sent: Monday, October 11, 2004 4:55 PM
To: Oracle-L_at_Freelists. Org (E-mail)
Subject: RMAN: backup archivelog until time 'sysdate-2' delete input

Hi list,

It was "Mon Oct 11 16:12:07 CDT 2004" and I ran the following

RMAN> run {

2>      backup
3>       format '/oback/obckp/redo-logs/DV2_%s_%p.logs'
4>       archivelog until time 'sysdate-2' delete input;
5>     }

Since I specified "sysdate-2", I expected it only archive/delete up to "Oct 09 16:12:06". Was I right? But the truth is it archived/deleted redo file "1_1440.dbf", which was created between "Mon Oct 11 00:12:40 2004" and "Mon Oct 11 00:42:39 2004". WHY?

My last three redo files was:
.. .. ..

Sat Oct 9 06:23:22 2004
.. .. ..

Creating archive destination LOG_ARCHIVE_DEST_1: '/oracle/DV2/saparch/DV2arch/1_1439.dbf' Sat Oct 9 06:23:34 2004
.. .. ..

Mon Oct 11 00:12:40 2004
.. .. ..

Creating archive destination LOG_ARCHIVE_DEST_1: '/oracle/DV2/saparch/DV2arch/1_1440.dbf'
.. .. ..

Mon Oct 11 00:42:39 2004
.. .. ..

Mon Oct 11 15:39:37 2004
.. .. ..

Creating archive destination LOG_ARCHIVE_DEST_1: '/oracle/DV2/saparch/DV2arch/1_1441.dbf' Roger Xu
Database Administrator
Dr Pepper Bottling Company of Texas
(972)721-8337

This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material.



This email has been scanned for all viruses by the MessageLabs Email Security System. Any questions please call 972-721-8257 or email your request to tech_support_at_dp7uptx.com.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l

For technical support please email tech_support_at_dp7uptx.com or you can
call (972)721-8257.
This email has been scanned for all viruses by the MessageLabs Email Security System.



This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material. 
____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email Security System. Any questions please call 972-721-8257 or email your request to tech_support_at_dp7uptx.com.
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Oct 12 2004 - 15:16:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US