سؤال

I recently spotted 3 very old archivelog directories on disk that do not appear within RMAN.

[oracle@ORACLE01 archivelog]$ du -sh *
122M    2017_02_25
4.9G    2017_02_26
2.5G    2017_02_27
1.6G    2017_06_28
474M    2017_06_29

Within RMAN, archivelogs appear from the 28th June (as I would expect)

RMAN> list archivelog all;  (list truncated for brevity)
using target database control file instead of recovery catalog
List of Archived Log Copies for database with db_unique_name R2CI
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
30329   1    81000   A 28/06/2017 10:45:26
        Name: /u01/.../archivelog/2017_06_28/o1_mf_1_81000_do72c0ng_.arc

30330   1    81001   A 28/06/2017 10:48:00
        Name: /u01/.../archivelog/2017_06_28/o1_mf_1_81001_do73f110_.arc

If I run a crosscheck archivelog all, this picks up only the recent archivelog files that I expect to be there:

RMAN> crosscheck archivelog all;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
validation succeeded for archived log
archived log file name=/u01/.../archivelog/2017_06_28/o1_mf_1_81000_do72c0ng_.arc RECID=30329 STAMP=947846881
validation succeeded for archived log
archived log file name=/u01/.../archivelog/2017_06_28/o1_mf_1_81001_do73f110_.arc RECID=30330 STAMP=947847970
validation succeeded for archived log
archived log file name=/u01/.../archivelog/2017_06_28/o1_mf_1_81002_do74pzcw_.arc RECID=30331 STAMP=947849313
validation succeeded for archived log
(list truncated for brevity)

A "list archivelog all" after this point does not show these old files.

Questions:

  1. Where are these files likely to have have come/why weren't they eventually expired and deleted like the rest of the archivelogs?

  2. Why does crosscheck archivelog all not detect them and add them back? is it because there is a 4 month gap between them and the next most recent files?

  3. Is it safe to just delete these files off disk?

Thanks

هل كانت مفيدة؟

المحلول

Why does crosscheck archivelog all not detect them and add them back?

Because that's not what crosscheck does. Crosscheck reads the records of the archlogs that are recorded in the repository - the ones that rman reports. It reads a record from the repository, then checks to see if that file exists. If not, the record is marked 'expired'. If rman shows no sign of knowing of these files, I'd say it's safe to delete them.

نصائح أخرى

Where are these files likely to have have come/why weren't they eventually expired and deleted like the rest of the archivelogs?

I would suspect that these files vanished from your repo because the following conditions were met: The files where not needed anymore to meet your recovery policy (rman policy) and they also exceeded the parameter controlfile_record_keep_time. At this point Oracle would overwrite the records in your controlfile. If you backup and delete archivelogs on daily terms, you should not have any "dead" archivelogs.

EdStevens already answered the other two questions...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top