mudas Blog

The World According to …

Delete archivelogs files without using RMAN

leave a comment »

asmcmd
++++++
(asmcmd) rm file_name

If you use a wildcard (*) – rm deletes all matches except non-empty directories (unless the -r flag is used).

sqlplus
+++++
(sqlplus) alter diskgroup drop file

Drawback:
The asmcmd and sqlplus command will not update the database views (V$ARCHIVED_LOG, V$FLASH_RECOVERY_AREA_USAGE), controlfile, recovery catalog that the files have been removed.

To update the database views, control file or RMAN catalog you need to run following commands:
(rman) crosscheck archivelog all;
(rman) delete expired archivelog all;

Alternatively you can also set a ‘new’ db_recovery_file_dest if your disk or diskgroup is out of space to have some time to fix your problems:
(sqlplus) alter system set db_recovery_file_dest = ‘/database/disk1/recovery_file_1’ SCOPE=BOTH;
(sqlplus) alter system set db_recovery_file_dest_size = 50G SCOPE=BOTH;

Written by David Murko

September 22, 2010 at 10:06 pm

Posted in Oracle Database

Tagged with

Leave a comment