Monday, February 7, 2011

Deleting archive logs matter, no matter whether they are backed up or not

It is sometimes useful to delete the archive logs without backing them up. In my case, I need time and disk space before taking the backup to the tape, which will be accomplished by backup team.

Also it could be done permananently, in order to make your database run in archive log mode but without consuming so much disk space, which will enable you to recover from media failures.

Excerpt from OTN discussion, thank you Arul for the below lines:

To delete all archivelog on disk no matter wether they are backed up or not ...

RMAN > delete archivelog all;

To delete all archivelog on disk no matter wether they are backed up or not and they are one day old ...

RMAN > delete archivelog all completed before 'sysdate -1';

http://forums.oracle.com/forums/thread.jspa?messageID=2033883

In order to continue full backup of archivelogs you must issue below statements:

[oracle@mydb]:/nsr/rman/log> rman target /

RMAN> crosscheck archivelog all;
RMAN> delete noprompt expired archivelog all;

2 comments:

Ahmed Al Omari said...

Thanks for the informative article .

Honestly I'm a bit still confused about archive logs , and what are they exaxtly for ?

Assuming you have a 9i database . where you have it enabled in archive mode , yet constantly deleting the archived redo logs , due to space constraints .

Will you be able to perform a full level 0 backup , and the following incremental backups , in the absence of the archived redo logs ? And are these incremental backups enough to recover the database or particular data files , to the point of the backup itself at least ?

Thanks for any advice .

Regards

deryaoktay said...

Hi Ahmed,

You could open your database without archivelogs. Look for http://deryaoktay.wordpress.com/2012/10/13/571/

Archivelog mode is needed for taking online backup of tablespaces, databases at least. For instance, in pre-production environments, in case you have not got the disks yet, you may choose deleting archivelogs.

Thank you.

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here. I will update this post, with newer ones by the ti...