Help on this RMAN job [message #168337] |
Wed, 19 April 2006 16:51 |
suryamz
Messages: 17 Registered: March 2006
|
Junior Member |
|
|
Hi,
Current Event Oracle 8.1.7/Windows NT.
We have been executing this rman script on the first of every month.
Today, when i was analyzing for the data.. i found that after backing up the data its deleting the archives
from middle of the month.
For Example:
For the recent job which ran on 1st of April, it deleted the archive jobs from Mar 17th to Mar 31st without deleting the
first half's months data (i.e., Mar 1st to Mar 16th).
This is been happening for the last 3-4 months jobs.
Can anyone let me know the reason beyond this.
It was working fine earlier.
Your immediate solution is very much appreciated.
Thanks
run
{
allocate channel ch1 type disk format 'F:\oracle\oradata\backup\b_%u_%s_p';
backup
(database include current controlfile);
backup (archivelog from time 'Oct 21 2002 1:37:0' all delete input);
}
|
|
|
Re: Help on this RMAN job [message #168454 is a reply to message #168337] |
Thu, 20 April 2006 09:12 |
markmal
Messages: 113 Registered: April 2006 Location: Toronto, Canada
|
Senior Member |
|
|
You have a statement "archivelog from time 'Oct 21 2002 1:37:0' all delete input". It means what has been backed up will be removed. What has not backed up in this particular statement will not be removed.
What do you try to achieve?
As an example here is my script that removes archlogs older than 4 days back.
allocate channel for maintenance type disk;
change archivelog all crosscheck;
release channel;
allocate channel for delete type disk;
change archivelog until time 'SYSDATE-4' delete;
release channel;
|
|
|
Re: Help on this RMAN job [message #168480 is a reply to message #168454] |
Thu, 20 April 2006 12:08 |
suryamz
Messages: 17 Registered: March 2006
|
Junior Member |
|
|
Thanks for your reply
This script was created was back (year 2000 i guess)by some other DBA.
As informed earlier, this is executed on the 1st of every month and the main goal is to backup all the months archive data and delete the data.
However, it is deleting the data starting from 17th to end of the month.Which means the 1st 16 days of data are not getting deleted.
Any more inputs is very much appreciated.
|
|
|
Re: Help on this RMAN job [message #168496 is a reply to message #168454] |
Thu, 20 April 2006 13:18 |
markmal
Messages: 113 Registered: April 2006 Location: Toronto, Canada
|
Senior Member |
|
|
are you sure that all files backed up well?
do you have a log and trace?
but wait, in your case you do not need "from time 'Oct 21 2002 1:37:0'" clause.
Depending when (what time of) 1-st day it starts, you probably need something like
backup archivelog until time 'TRUNC(SYSDATE)-1' all delete input;
|
|
|