Operating System - HP-UX
1751858 Members
5587 Online
108782 Solutions
New Discussion юеВ

Re: old archived log shown not deleted?

 
jane zhang
Regular Advisor

old archived log shown not deleted?

From time to time, I delete old (8 days old) archive log file to free up space in the /u01/app/oracle/admin//arch after cold backups (once a week on Saturday).
I recently installed oracle NT client with dba studio and add the instances to the database tree within dba studio.
To my surprise, when I connect the db instance and check the archive log, there is a long list of archive log file showing ( several month old) and saying not deleted.

I then queried v$archive_log using sqlplus
select name, deleted from v$archived_log;
I got the same results
...
NAME
--------------------------------------------------------------------------------
DEL
---
/u01/app/oracle/admin/VCSEL/arch/T0001S0000000067.arc
NO
67 rows selected.

Here is the file I 'ls' while in directory log_archive_dest.

$ ll -a
total 112664
drwxrwxr-x 2 oracle oinstall 2048 Oct 29 13:38 .
drwxrwxr-x 8 oracle oinstall 1024 Aug 13 14:08 ..
-rw-rw---- 1 oracle oinstall 5243904 Oct 18 18:55 T0001S0000000059.arc
-rw-rw---- 1 oracle oinstall 5243904 Oct 19 11:50 T0001S0000000060.arc
-rw-rw---- 1 oracle oinstall 5243904 Oct 19 16:14 T0001S0000000061.arc
-rw-rw---- 1 oracle oinstall 5243904 Oct 20 15:00 T0001S0000000062.arc
-rw-r----- 1 oracle oinstall 5243904 Oct 21 12:00 T0001S0000000063.arc
-rw-r----- 1 oracle oinstall 5243904 Oct 22 08:00 T0001S0000000064.arc
-rw-r----- 1 oracle oinstall 5241856 Oct 23 18:28 T0001S0000000065.arc
-rw-r----- 1 oracle oinstall 5243904 Oct 24 18:30 T0001S0000000066.arc
-rw-rw---- 1 oracle oinstall 5243904 Oct 25 13:30 T0001S0000000067.arc
-rw-rw---- 1 oracle oinstall 5243904 Oct 26 16:21 T0001S0000000068.arc
-rw-r----- 1 oracle oinstall 5243904 Oct 29 13:38 T0001S0000000069.arc

Can anybody tell me why? sorry this is a long question.
6 REPLIES 6
harry d brown jr
Honored Contributor

Re: old archived log shown not deleted?

When you delete an archive log, are you using oracle utilities, or your own?


live free or die
harry
Live Free or Die
Printaporn_1
Esteemed Contributor

Re: old archived log shown not deleted?

I don't too sure , but archive log deleted by operating system command , it's not recognized by control file , may be control file will update this information after next shutdown/start up of the instance.
enjoy any little thing in my life
jane zhang
Regular Advisor

Re: old archived log shown not deleted?

Hi,
I put OS command.
find -mtime +8 -exec rm {} \;
in the coldbackup script, if coldbackup succeed, the archived log before this coldbackup are deleted.
please let me know the proper way, and how do I correct the display of DBA studio and query result?
Thank you,


Andreas D. Skjervold
Honored Contributor

Re: old archived log shown not deleted?

Hi

When Oracle run i archivelog mode it archives full redologs to an archive area. If the database crashes and needs to be recovered Oracle uses the redoinformation stored in the redologs to redo changes applied to the database after the last update of the datafiles (on checkpoint). If the information on the redologs are filling fast or the recovery needs old data, there is a need for using the archived redologs.
These files are expected by Oracle to be found at the archive area, and are kept trackof by the data dictionary.
If you moved / delete archived redologs, there is no way Oracle can sense this and belives that this data still is in place. Upon an recovery session later, Oracle will check archive location for these files.

If using RMAN or other Oracle compatible backup utility to backup and delete these files, Oracle is informed of the action taken by RMAN and the files is marked as deleted.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Andreas D. Skjervold
Honored Contributor

Re: old archived log shown not deleted?

Hi

If you have RMAN available you can cleanup in these entries by typing the following at the RMAN prompt after using OS command to delete:

RMAN> change archivelog all crosscheck;

From until 8.1.5 this markes deleted logs as deleted, and of 8.1.6 removes the entry.

Otherwise the these entries are stuck until the MAXLOGHISTORY parameter is reached, the info is then overwritten in the controlfile (not Data Dictionary as I wrote earlier)

You might recreate the controlfile to get rid of these, but that would be like shooting sparrows with a stinger missile.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
jane zhang
Regular Advisor

Re: old archived log shown not deleted?

Andreas,
Thank for the explanation.
I am not using rman to do the backup and recovery, and planning to set it up very soon after I am clear about the rman compatibility matrix.
I will deal with it later using rman.
Regards,