Archive logs removal question
From: Richard <RSL101_at_gmail.com>
Date: Mon, 18 May 2009 08:29:20 -0700 (PDT)
Message-ID: <6313a64c-a397-483d-a53c-c23de0181031_at_f16g2000vbf.googlegroups.com>
This should be fairly common question I hope. I like to know if it is safe to remove these old archive log files. Oracle is 9i RAC (2 nodes dr_1,dr_2). It seems to tell me oldest log is 1086. So I can remove anything up to and including "....1086.arc" ? It also has 2 directory locations. Please help a newbie. Thank you in advance.
SQL> 1* select 'rm '||substr(name,1,50) from v$archived_log where completion_time < (sysdate - 10 ) order by 1 SQL> / 'RM'||SUBSTR(NAME,1,50)
rm /oracle/product/92/dbs/dr/archive1/dr1_1_1066.arc rm /oracle/product/92/dbs/dr/archive1/dr1_1_1067.arc
....
....
rm /oracle/product/92/dbs/dr/archive1/dr1_2_1463.arc rm /oracle/product/92/oradata/archive2/dr1_1_1065.arc
....
rm /oracle/product/92/oradata/archive2/dr1_1_1077.arc rm /oracle/product/92/oradata/archive2/dr1_2_1452.arc
....
rm /oracle/product/92/oradata/archive2/dr1_2_1463.arc
Date: Mon, 18 May 2009 08:29:20 -0700 (PDT)
Message-ID: <6313a64c-a397-483d-a53c-c23de0181031_at_f16g2000vbf.googlegroups.com>
This should be fairly common question I hope. I like to know if it is safe to remove these old archive log files. Oracle is 9i RAC (2 nodes dr_1,dr_2). It seems to tell me oldest log is 1086. So I can remove anything up to and including "....1086.arc" ? It also has 2 directory locations. Please help a newbie. Thank you in advance.
SQL> archive log list
Database log mode Archive Mode Automatic archival Enabled Archive destination /oracle/product/92/oradata/archive2 Oldest online log sequence 1086 Next log sequence to archive 1087 Current log sequence 1087
SQL> 1* select 'rm '||substr(name,1,50) from v$archived_log where completion_time < (sysdate - 10 ) order by 1 SQL> / 'RM'||SUBSTR(NAME,1,50)
rm /oracle/product/92/dbs/dr/archive1/dr1_1_1066.arc rm /oracle/product/92/dbs/dr/archive1/dr1_1_1067.arc
....
rm /oracle/product/92/dbs/dr/archive1/dr1_1_1077.arc rm /oracle/product/92/dbs/dr/archive1/dr1_2_1452.arc rm /oracle/product/92/dbs/dr/archive1/dr1_2_1453.arc
....
rm /oracle/product/92/dbs/dr/archive1/dr1_2_1463.arc rm /oracle/product/92/oradata/archive2/dr1_1_1065.arc
....
rm /oracle/product/92/oradata/archive2/dr1_1_1077.arc rm /oracle/product/92/oradata/archive2/dr1_2_1452.arc
....
rm /oracle/product/92/oradata/archive2/dr1_2_1463.arc
49 rows selected. Received on Mon May 18 2009 - 10:29:20 CDT