RMAN Delete old archivelogs

delete force noprompt archivelog all completed before 'sysdate-7';
If you want to delete archive logs older than few hours:
Verify the time like how many hours older than you want to delete.
SQL> alter session set nls_date_format='MM/DD/YYYY HH24:MI:SS';
Session altered.
SQL> select sysdate-1/11 from dual;

12/08/2013 08:33:05 SQL> SQL>
SQL> select sysdate from dual; SYSDATE
12/08/2013 10:44:15 SQL> So sysdate-1/11 will delete the files older than 8:30 am. RMAN>connect target /
delete noprompt archivelog until time '(sysdate-1/11)' backed up 1 times to device type sbt_tape; or RMAN> delete force noprompt obsolete;
RMAN> delete force noprompt expired;

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

%d bloggers like this: