Recover database while archivelogs are purged [message #431203] |
Mon, 16 November 2009 03:33 |
chetanaZ
Messages: 132 Registered: October 2009 Location: UK
|
Senior Member |
|
|
Hi,
In a Test environment I want to take weekly backup of whole database (rman backup)
However because of the space coonstraints we are unable to keep archivelogs generated time to time and would schedule a batch job to purge archive logs using following rman script
rman> delete archivelog all;
My question is how I can take backup of database in this case?
My backup script would be (roughly) like this
backup database
sql 'alter system archive log current';
backup archivelogs;
if I have archivelog purge schedule which purges archivelogs at every 2 hours
1) can i disable the schedule at 10:00
2) start the backup at 10:00
3) after backup finished at 10:30 again start the purge routine at 10:31
4)And if needed I can recover the database till 10:30 from the backup only?
Sorry if I am not clear from above
To make things clearer
10:01 arc01 is created
10:03 arc03 is created
10:05 arc05 is created
10:07 all logs are purged and purge routine is disabled now
10:07 backup starts and continies till 10:30
This backup archives current log and backups archivelogs available between 10:07 till 10:30
now the purge starts again at 10:30 as soon as backup finishes
next day i want to restore and recover database till 10:30 of the last day
Is that possible if I have only the archivelogs (10:07 - 10:30) in the backup sets?
Thanks and Regards,
Chetana
|
|
|
|
Re: Recover database while archivelogs are purged [message #431249 is a reply to message #431203] |
Mon, 16 November 2009 05:33 |
chetanaZ
Messages: 132 Registered: October 2009 Location: UK
|
Senior Member |
|
|
Thanks Ebrian,
I got excatly what I want from your first statement
"As long as you are doing the final switch of the current redo log and backing up the archivelogs, you should be OK restoring to 10:30 in your example."
very much clear
However if I am not explicitly switching current redo log using
sql 'alter system archive log current'
then will the following command switch it implicitly before it backs up the archivelogs.?
RMAN> backup database plus archivelog delete input;
Also I have one more query in relation to this :
If the archivelogs are in the backup sets but not at archive_log_dest will 'SQL+ Recover' command restores it from the backup set or only RMAN can restore it while 'Recover Database' is issued?
I understand that SQL+ and RMAN recover commands differ here.
Thanks and Regards,
Chetana
|
|
|
|
Re: Recover database while archivelogs are purged [message #431258 is a reply to message #431203] |
Mon, 16 November 2009 06:26 |
chetanaZ
Messages: 132 Registered: October 2009 Location: UK
|
Senior Member |
|
|
Thanks Michel,
There is some confusion on my side
I agree that that the following command will switch the log (and archives)
sql 'alter system archive log current'
My question was about following command
backup database plus archivelog delete input;
Will it also switch the log before backing it up?
Also thanks for confirming my understanding regarding 'SQL+ Recover'
Thanks and Regards,
Chetana
|
|
|
|
|