Skrevet av Emne: Oracle: Deleting old archive logs  (Lest 4320 ganger)

ATC

  • Gjest
Oracle: Deleting old archive logs
« på: 16. Juni 2009, 20:30 pm »
  • [applaud]0
  • [smite]0
  • When using archive logs, Oracle will keep filling up the disk. One day (usually a friday evening or during a holiday) the disk is full and all the databases go down in flames. How can I prevent this from happening?



    ATC

    • Gjest
    [Solved] Oracle: Deleting old archive logs
    « Svar #1 på: 16. Juni 2009, 20:30 pm »
  • [applaud]0
  • [smite]0
  • Using the management console, check where the archive logs are kept. Note: Do NOT EVER delete the redo log files, those are needed by the system. If you are unsure, google "oracle archive logs" and read up on the subject.

    When sure, locate the archive log files older than N days by saying for instance
    "find . -mtime +30 | grep archive/ | xargs ls"

    Check the files again, and if you are 100% sure, substitute ls with rm and run the search again.

    Now you have to tell RMAN that those archive logs are gone:
    "/oracle/app/oracle/product/9.2.0/bin/rman target sys"
    password: (xxxxxxxx)
    "crosscheck archivelog all;"
    "delete expired archivelog all;"