Clean Up Old Archivelogs In ADG..Or:”No Littering, Please!”

While I was running ADG happily for some time, I started to notice the archivelogs transferred to the standby database where starting to fill up the FRA area of the ADG..Why would I keep those old logs around (going back for a few months!) while they where already applied? No reason for me to do this, so I decided to clean them up.

First: remove the completed archivelogs to clear the space:

Log into RMAN on the standby and enter this command:

RMAN> delete archivelog all completed before 'sysdate';

or if you still wanted to keep some, play around with ‘sysdate-7’ if you wanted to keep a weeks worth of completed archivelogs.

Since I don’t want to schedule a job for this, or worse: get surprised when I don’t remember to do this on time, I applied this policy:
On Primary

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

On Standby

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

Please read up on this setting, and the consequences it may have to your backup strategy!

Have a good day!

Advertisements

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Databases, Dataguard and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s