Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004
    Posts
    50

    Unanswered: managing the archive logs

    Is there a good automatic way of maintaining the archive log files built in to Oracle?

    I've recently been assigned maintain a couple Oracle databases at a place with mostly SQL Server DBA's. Currently their procedure is to check the log file directory every month and delete the oldest files manually. There's got to be a better way, right?!

    BTW - This is Oracle 9.2 running on a Win2000 server, if that makes a difference.

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    What software are they using to backup the oracle database. Are they doing hot (database up) or cold (database down) backups?
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Sep 2004
    Posts
    50
    We're using Veritas Backup Exec 8.6 for this particular server (Win NT not 2000 as I initially thought).

    All backups are cold, and are done nightly. There appears to be a windows CMD script called by the scheduled job that shuts down the DB, in addition to performing some other tasks. I suppose I could add some file management in there.

    I was just wondering if there was something built into Oracle that did this, but I haven't seen anything.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    RMAN does this with a command:
    delete obsolete;

    this deletes all obsolete archive logs and backups. Obsoletes are defined by your RMAN settings regarding retention.

    IE: If you retention policy is "keep 7 days of backups" then RMAN only deletes backups older than 7 days

    once you have a cold-backup you don't really need any archive-logs that occurred before that backup. It's probably a good policy to keep archivelogs through two old sets of cold-backups just in case.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by akosz
    We're using Veritas Backup Exec 8.6 for this particular server (Win NT not 2000 as I initially thought).

    All backups are cold, and are done nightly. There appears to be a windows CMD script called by the scheduled job that shuts down the DB, in addition to performing some other tasks. I suppose I could add some file management in there.

    I was just wondering if there was something built into Oracle that did this, but I haven't seen anything.
    As the duck said, this is done automatically if you are using rman to backup the database. That being said, all you need to do is to have the script call a cleanup script before Veritas restarts the database and delete all archive logs greater then x number of days.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  6. #6
    Join Date
    Sep 2004
    Posts
    50
    i've done some more research into the rman and it seems like that's the direction we need to head in with all of our oracle db's.

    thanks for the advice guys, i appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •