Home » RDBMS Server » Backup & Recovery » archivelog deletetion (Database 11gR2 OEL6.3)
archivelog deletetion [message #622296] Mon, 25 August 2014 00:11 Go to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
I have configured backup scripts...
I am taking backup of archivelog hourly and delete them using delete input...
Now management wants to retain 6 days archives on Disk...along with backup...

How can I do that
Re: archivelog deletetion [message #622302 is a reply to message #622296] Mon, 25 August 2014 01:27 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Configure your retention policy.

Re: archivelog deletetion [message #622330 is a reply to message #622302] Mon, 25 August 2014 03:48 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
I already have retention policy...
For example if i have retention policy 4 then delete obsolete command should delete backups beyond 4 full backups....
But it delete obsolete backup along with archivelogs that have been backuped up.
Management want to retain archivelogs in FRA for 6 days along with archivelog backup.....
Re: archivelog deletetion [message #622338 is a reply to message #622330] Mon, 25 August 2014 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Remove "delete input" on backup and use "delete archivelog until time" to delete the oldest archived logs.

Re: archivelog deletetion [message #622383 is a reply to message #622338] Mon, 25 August 2014 22:54 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
Yes
You are right....
But When I did delete obsolete then archivelogs are also deleted......Why
Re: archivelog deletetion [message #622386 is a reply to message #622383] Tue, 26 August 2014 00:05 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Because this is how it is designed and works.
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta016.htm#i81315

Quote:
OBSOLETE Deletes data file backups and copies recorded in the RMAN repository that are obsolete, that is, no longer needed (see Example 2-66). RMAN also deletes obsolete archived redo log files and log backups.


Re: archivelog deletetion [message #622398 is a reply to message #622386] Tue, 26 August 2014 02:19 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
SO,
It is impossible....
Re: archivelog deletetion [message #622403 is a reply to message #622398] Tue, 26 August 2014 02:30 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

No it is possible, just do what I said, and I said use DELETE not use DELETE OBSOLETE.

Re: archivelog deletetion [message #622429 is a reply to message #622403] Tue, 26 August 2014 05:32 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
Any example please.....
I did not understand...
Please give me example...
Re: archivelog deletetion [message #622430 is a reply to message #622429] Tue, 26 August 2014 05:39 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Michel Cadot wrote on Mon, 25 August 2014 12:09

Remove "delete input" on backup and use "delete archivelog until time" to delete the oldest archived logs.


You have the example in red, you just have to complete with the time you want.
More examples there.

Re: archivelog deletetion [message #622436 is a reply to message #622296] Tue, 26 August 2014 08:00 Go to previous messageGo to next message
EdStevens
Messages: 282
Registered: September 2013
Senior Member
smunir362 wrote on Mon, 25 August 2014 00:11
I have configured backup scripts...
I am taking backup of archivelog hourly and delete them using delete input...
Now management wants to retain 6 days archives on Disk...along with backup...

How can I do that


I'd be asking why they think they need to keep the archivelogs AND the backups of the archivelogs.
As you can see, this makes you jump through some real hoops in managing your backups and archivlogs. Especially when it comes to the all-important housekeeping tasks of DELETE OBSOLETE. The "requirement" from your PHB runs counter to the way Oracle backup management is designed to work.
Re: archivelog deletetion [message #622453 is a reply to message #622436] Tue, 26 August 2014 10:20 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
yes
But I am using delete obsolete in my backup scripts....
If I add delete archivelog until time....it is ok...
But When delete obsolete will execute then archivelog would be deleted......along with backupset which are out of retention...

If I remove delete obsolete from my scripts then obsolete backups would not be deleted automatically...
Re: archivelog deletetion [message #622454 is a reply to message #622453] Tue, 26 August 2014 10:33 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Yes, either you ask RMAN to do it automatically for you either you do it yourself manually.

Re: archivelog deletetion [message #622505 is a reply to message #622454] Wed, 27 August 2014 03:56 Go to previous messageGo to next message
smunir362
Messages: 246
Registered: September 2007
Senior Member
Ok right..
So,I conclude...
I cannot use delete obsolete in my scripts or in RMAN prompt ..If I want to save archive logs older than 6 days.
Re: archivelog deletetion [message #622506 is a reply to message #622505] Wed, 27 August 2014 04:05 Go to previous messageGo to next message
Michel Cadot
Messages: 59149
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Yes.

Re: archivelog deletetion [message #622561 is a reply to message #622330] Wed, 27 August 2014 11:55 Go to previous message
tim2boles
Messages: 34
Registered: August 2008
Location: Clarksburg, WV
Member
Quote:
Management want to retain archivelogs in FRA for 6 days along with archivelog backup.....


This was touched on once before but I believe it was overlooked. What is the purpose of keeping 6 days of archivelogs and their backups if you are deleting the database backup?

You would have to restore the database backup to be able to use the archivelogs.

Unless you have a standby database, then there are other configurations to consider.
Previous Topic: Unable to Recover database
Next Topic: ora-00245:control file backup failed;Target is likely on local file system
Goto Forum:
  


Current Time: Sun Sep 21 19:59:37 CDT 2014

Total time taken to generate the page: 0.08552 seconds