archive log file deletion 9i
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: archive log file deletion 9i

  1. #1
    Join Date
    Aug 2005
    Posts
    69

    archive log file deletion 9i

    hi people,
    we run rman backup every night and cold backup once a week.
    However, even though rman deletes the log files, and so they show as dleeted in Oracle views, the physical .001 files are remaining on the log drive.
    they are taking up approx 35 gig per database, going back serveral months and using lots of space.
    When is it safe to delete them from the file system? - isn't it true that they may be required at any time if we needed to do a restore/recovery? - although I have also been told that once a cold backup had been done we no longer need them - I have suspicions that this is incorrect though?
    Can someone please advise me?

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Think about what you need to restore/recover your database... a good full backup and redo logs from that point in time until the point in time you want to recover.

    That been said and assuming you are doing tape backup of your archived redo logs I would keep on the box only the ones younger than your last good full backup.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Aug 2005
    Posts
    69
    hi Pav,
    the nature of our business dictates that we are only likely to need to recover using the last good backup etc.
    We are never going to need to go back serveral weeks etc.
    I guess my question is around the usefulness of the archive logs .. if we had a full backup through rman say last night, and we needed to recover today, then would we need any archive log files that were older than yesterday? i.e. when the backup is taken is the content of the archive log files up to date and the database contains everything up to date in its datafiles, and anything older is redundant, or would we need the older ones in the event of having to go back further in time (which as I said is pretty much never)?
    i.e. if we for example needed to do a point in time recovery to last week, then if we had deleted the archive log files would we not be able to do it, or would the database have record of the data at that point in time anyway, so we would not need them?

    Also, rman deletes the log files in realtion to the database once it has backed up - but it is the physical files that are remaining, are they any use to us?

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    It all depends of your backup/recovery strategy.

    Let me say it again: all you need "to restore/recover your database is... a good full backup and redo logs from that point in time until the point in time you want to recover."

    If needed files are not on the box you have to restore them from tape, that's the purpose of writting them to tape
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    Hi davo,
    I think you are taking the backups of archivelogs,then you have the backups of the archivelogs,If you lost the archivelogs you can restore it from the backups using the RMAN.how many days backup you want to keep in your server.configure the retention policy like that and delete the obsolete backups.

  6. #6
    Join Date
    Aug 2005
    Posts
    69
    hi Pav,
    the nature of our business dictates that we are only likely to need to recover using the last good backup etc.
    We are never going to need to go back serveral weeks etc.
    I guess my question is around the usefulness of the archive logs .. if we had a full backup through rman say last night, and we needed to recover today, then would we need any archive log files that were older than yesterday? i.e. when the backup is taken is the content of the archive log files up to date and the database contains everything up to date in its datafiles, and anything older is redundant, or would we need the older ones in the event of having to go back further in time (which as I said is pretty much never)?
    i.e. if we for example needed to do a point in time recovery to last week, then if we had deleted the archive log files would we not be able to do it, or would the database have record of the data at that point in time anyway, so we would not need them?

    Also, rman deletes the log files in realtion to the database once it has backed up - but it is the physical files that are remaining, are they any use to us when the database regards them as deleted anyway?

  7. #7
    Join Date
    Aug 2005
    Posts
    69
    below is the rman script that runs every night.
    It deletes the archive log files (but from the database, not the file system in windows) older than 2 days.
    Can I safely assume that rman has all the info it needs to recover should we have a problem, and so we can set up a job to delete the physical files from the o/s after say 3 or 4 days to be safe? - I cant see what use they are if they have been disassociated from the database if I look in the view and they show as deleted.
    Also, if for any reason we needed to go back i ntime, could we do that with via rman even though the archive logs are no longer available?

    #set ORACLE_SID=acc
    #rman target=/ catalog rman/mypassword@rmancat cmdfile=rman.rcv_rssystem.txt


    configure retention policy to recovery window of 2 days;

    configure controlfile autobackup off;

    configure backup optimization on;

    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = 'G:\ORACLE\rman_backups\acc\%d_%T_%U' ;

    # print the configuration including the retention policy
    SHOW ALL ;

    # backup data files(DBF), redo files(ARC), control files(CTL), dataabse server parameter file(SPFILE)
    BACKUP FULL DATABASE TAG='DATA' SPFILE TAG='PARAMETER' CURRENT CONTROLFILE TAG='CONTROL' PLUS ARCHIVELOG delete input TAG='REDO' ;

    # delete backups that are no longer needed to satisfy the retention policy.
    # delete any data backups generated without the KEEP option not required to recover
    # delete redo backups are not needed if they are older than ANY existing data backup.
    DELETE noprompt backup completed before 'sysdate-2';

    # get complete list of existing backups
    LIST BACKUP SUMMARY;

    #-end of file-

  8. #8
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by davo
    It deletes the archive log files (but from the database, not the file system in windows) older than 2 days.
    Something is wrong, rman do deletes physical files.

    Please do...
    Code:
    CROSSCHECK BACKUP; 
    DELETE EXPIRED BACKUP;
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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


Click Here to Expand Forum to Full Width