Delete old and backed up archive log,

Hi all,
Am trying to modify our RMAN backup script to delete old and backed up archive logs off the disk.
We run daily Incremental L0 or L1 backups, with 3 daily archive log backups. Currently we delete archive logs as they are backed up (backup archivelog all delete input). However, we are considering leaving x days worth of archive logs on disk, just in case, quick restore is needed (e.g. tablespace media recovery etc. etc.)
For example,
We can delete archive logs old tha n x (where x=no_days depending on database) by,
delete archivelog until time 'sysdate-15';
We can also delete archive logs that have been backed up to disk by,
delete archivelog all backed up 1 times to disk;
Questions,
1) Why does 'backed up 1 times to disk' require the 'all' in the statement ?
2) Is there any way to combine the 2 statements ? (backed up 1 times and older than x days ?). Just being a bit extra cautious to ensure that we have everything backed up. In real-world shouldn't be a problem, as we will be alerted to any backup failures, but trying to cater for the very worst situation.
Thanks for your help and insight.

Hi,
Scratch the questions. Found the answer in another thread. Seems when I tried to combine the statements initally, I had a typo.
It is now working as expected.
Thanks and regards,

Similar Messages

  • How to delete old account, I can't log in due to - This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.

    How to delete old account, I can't log in due to error - This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID.

    All good, I loved with AppStore and now everything seems to be back to normal.

  • HT4847 I can not delete old icloud back up from my old phone, keep receiving an error message "this back up can not be deleted because it's in use" it is not in use that phone is long gone!

    I can not delete old icloud back up from my old phone, keep receiving an error message "this back up can not be deleted because it's in use" it is not in use that phone is long gone!

    I have the same problem here and it wont let me do another back up or delete the old one.... Please help!!!! Anyone

  • REDO scanning goes in infinite loop and Too much ARCHIVE LOG

    After we restart DATABASE, capture process REDO scanning goes in infinite loop and Too much ARCHIVE LOG being generated.
    No idea whats going on.... otherwise basic streams functionality working fine.

    What's your DB version

  • In apple maps, i can't delete old and wrong addresses

    On iPhone 6, in apple maps, i can't delete old and wrong addresses. How can I get it to delete addresses?

    When you open Maps touch the search bar and on the resulting screen you'll see Favorites. Touch Favorites and in that resulting screen you'll see a Clear button at the top. Then click Done to return to the map.

  • Delete old and unused Archived Redo Log Files

    Hello forum!
    My db was in ARCHIVELOG mode and It created 9GB of archived redo log files.
    Now I put the db in NOARCHIVELOG mode, can I delete all the ARLF? am I sure that the DB never need those files in the future?
    If yes, how can I delete them? I will use 'del' operative system command?
    In addition, I found this command:
    SQL>alter database open resetlogs;
    is it useful for my purpose?
    thank you!

    You are safe to remove those archivelog files if you altered your database to no archive log mode. Just remove them from OS level
    Please bear in mind that database in no archivelog mode will lost data in the event of disaster.
    SQL>alter database open resetlogs;Doesn't help in your situation, it's use to bring up database after incomplete recovery.

  • Why backing up archive logs? (and more...)

    Hi all,
    If I schedule a weekly backup every Saturday:
    BACKUP DATABASE PLUS ARCHIVELOG;
    1- Does the command backup all the archivelogs generated during the week (and what for as far as I have the full backup) or only the archivelogs generated during the backup execution time?
    2- If I use a daily incremental backup with a weekly merge strategy , does the weekly archivelogs needed (or only one day) in case of recovery?
    3- The incremental Merge operation only uses the incremental backupset and the previous full backup to merge into datafile copies. No archivelogs are used to do this merge operation?
    4- Does the following strategy meaningfull regarding the archivelogs (incremental and merge backup every day)?
    RUN {
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'INCR' DATABASE;
    RECOVER COPY OF DATABASE WITH TAG 'INCR';
    DELETE NOPROMPT OBSOLETE;
    BACKUP ARCHIVELOG ALL DELETE INPUT;
    Thanks,
    Vince

    BACKUP DATABASE PLUS ARCHIVELOG;
    1- Does the command backup all the archivelogs generated during the week (and what for as far as I have the full backup) or only the archivelogs generated during the backup execution time?
    The above command will first generate a log switch then backup the archivelogs which have not been backed up so far then backup the database (full) and then switch the log file again and backup the remainining archivelogs.
    2- If I use a daily incremental backup with a weekly merge strategy , does the weekly archivelogs needed (or only one day) in case of recovery?
    RMAN always take incremental over archivelogs so if the incremental backup is available then archivelogs are not required BUT let say all the incrementals are taken as 2 am and you want to recover the database upto 4pm so next day incremental wont work then RMAN will use all incrementals upto the day of failure and then use the archivelogs for remaining recovery. In short you should decide the recovery window of your database means how far back you wanna go in case of incomplete recovery and you MUST keep all the archivelogs for that period of time.
    3- The incremental Merge operation only uses the incremental backupset and the previous full backup to merge into datafile copies. No archivelogs are used to do this merge operation?
    I hope answer number 2 will help here too.
    4- Does the following strategy meaningfull regarding the archivelogs (incremental and merge backup every day)?
    RUN {
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'INCR' DATABASE;
    RECOVER COPY OF DATABASE WITH TAG 'INCR';
    DELETE NOPROMPT OBSOLETE;
    BACKUP ARCHIVELOG ALL DELETE INPUT;
    If this is the only backups you are having so it means your recovery window is 1 day because your backup copies are a day older than your current database and you can't use these copies to restore more than a day back. BUT you still want to backup archivelogs for last day so that in case of failure you can use restore upto a specific time and you dont want the archilogs more than a day older, those are useless because there is no prior backup available where you can apply those.
    Daljit Singh

  • Issue with backing up Archive logs

    Hi All,
    Please help me with the issues/confusions I am facing :
    1. Currently, the  "First active log file  = S0008351.LOG"  from "db2 get db cfg for SMR"
        In the log_dir, there should be logs >=S0008351.LOG
        But in my case, in addition to these logs, there are some old logs like S0008309.LOG, S0008318.LOG, S0008331.LOG  etc...
        How can I clear all these 'not-really-wanted' logs from the log_dir ?
    2. There is some issue with archive backup as a result the archive backups are not running fine.
        Since this is a very low activity system, there are not much logs generated.
        But the issue is :
        There are so many archive logs in the "log_archive" directory, I want to cleanup the directory now.
        The latest online backup is @ 26.07.2011 04:01:04
        First Log File      : S0008344.LOG
        Last Log File       : S0008346.LOG
        Inside log_archive there are archive logs from  S0008121.LOG   to   S0008304.LOG
        I wont really require these logs, correct ?
    Please clear my confusions...

    Hi,
    >
    > 1. Currently, the  "First active log file  = S0008351.LOG"  from "db2 get db cfg for SMR"
    >     In the log_dir, there should be logs >=S0008351.LOG
    >     But in my case, in addition to these logs, there are some old logs like S0008309.LOG, S0008318.LOG, S0008331.LOG  etc...
    >     How can I clear all these 'not-really-wanted' logs from the log_dir ?
    >
    You should not delete logs from log_dir because there online Redo logs and if you delete then there will be problem in start of db.
    > 2. There is some issue with archive backup as a result the archive backups are not running fine.
    >     Since this is a very low activity system, there are not much logs generated.
    >     But the issue is :
    >     There are so many archive logs in the "log_archive" directory, I want to cleanup the directory now.
    >     The latest online backup is @ 26.07.2011 04:01:04
    >     First Log File      : S0008344.LOG
    >     Last Log File       : S0008346.LOG
    >   
    If your archive logs are backed up from log_archive directory then you can delete old logs.
    Thanks
    Sunny

  • DB backup and removal of archive log files?

    I have an application that uses Oracle 10gR2 on Linux RedHat EL 4.5. The DB is fairly simple, so backing up daily or weekly by using expdp (Datapump) is fine for our needs. We have an install that uses Data Guard, which in archivelog mode is filling up the disks fast.
    What is the best way to clean up archive log files in a Data Guard configuration? I have seen posts that indicate RMAN is tough to work with and has problems with recovery, so I would rather avoid it.
    I would like script something on a daily or weekly basis.
    Thanks,

    RMAN not easy? Lets see how hard it is:
    rman target /
    RMAN> backup database;Surely that isn't too challenging.
    Now if you want to do it properly you are talking about setting up a repository ... much more complex:
    -- on the repository database server
    CREATE USER repos
    IDENTIFIED BY oracl1
    DEFAULT TABLESPACE users
    TEMPORARY TABLESPACE temp
    QUOTA UNLIMITED on users;
    GRANT create session, recovery_catalog_owner TO repos;
    -- on the target server (your production db)
    rman target / catalog repos/oracle1@<tnsnames_entry_for_your repository>
    RMAN> create catalog;
    RMAN> register database;
    RMAN> backup database;If this is too much perhaps you should look into MS Access. <g>
    All of this is documented at the top of the RMAN page in Morgan's Library at www.psoug.org so you can cut-and-paste your way through it if you want.
    How is an export not a backup you ask?
    The Oracle docs can be found at http://tahiti.oracle.com. You should consider reading them some time.
    As I said before ... an export can NOT be used to recover ... ever. That says it all.
    Your resistance to change. Your resistance to doing things properly. Your resistance to reading the docs. You'd better watch out. There are people who would like to have your job ... a lot of them.

  • Backing up Archive logs

    Hi!
    What is the best approach for backing up the Archive Logs?
    Because we must do this regularly, a scheduled job should be considered.
    Thank you!

    How you backing up the database and archive logs currently? Are the backups scheduled or ran manually?
    You can use Windows scheduler or cron on Unix (you did not provide OS or database version) to schedule the backup, or you can schedule the backup of the archive log in the database using DBMS_JOB or DBMS_SCHEDULER.

  • Recover DB which don have backup and not in archive log mode

    Hi
    today one of our DB in oracle 10gR2 in AIX got crashed which is not in archive log and which does not have any backup. It was maintained by the Developers and they need it to be recovered. When trying to open it says message like getting error with system01.dbf needs to more recover. Can any body help me. Very Urgent... Is there any way to recover the db??
    Thanks
    Ram

    Hello Mr.Sybrand Bakkar,
    Thanks for your suggestion. Being a DBA i myself knows that without anything I wont be able to. I m just trying to get some suggestions whether is there any way to recover it or has some experts came across these situations and got some answers. When we are not able to think beyond our limit, we come to the forums and post question. I know that this is not the place to write where i can be rude, Hence please change ur perception. When i say urgent, it means that unfortunately they have messed up their DB and came to DB Team for assistance to get their data back which has to be given to their process partners and As a support team we are trying our best to recover it. Anyhow thanks for your reply and suggestion. Have a great day.
    Thanks
    Ram

  • Backup and Recovery from Archive Log

    Dear all,
    I implemented hot backup with oracle9i and
    Can anybody suggest me how to backup and recovery archive log ?
    Thanks for advance.
    Chara

    assuming you are using RMAN for backup -
    backup ( archivelog all );
    backup ( archivelog all delete input ); - to delete from file system.
    If you are not using RMAN but backup using a script which puts the tablespaces in hot backup mode then you just need to backup archive log directory.
    The archive logs are required when you need to do a database recovery. You don't recover archive log files.
    rgds

  • System I/O and Too Many Archive Logs

    Hi all,
    This is frustrating me. Our production database began to produce too many archived redo logs instantly --again. This happened before; two months ago our database was producing too many archive logs; just then we began get async i/o errors, we consulted a DBA and he restarted the database server telling us that it was caused by the system(???).
    But after this restart the amount of archive logs decreased drastically. I was deleting the logs by hand(350 gb DB 300 gb arch area) and after this the archive logs never exceeded 10% of the 300gb archive area. Right now the logs are increasing 1%(3 GB) per 7-8 mins which is too many.
    I checked from Enterprise Manager, System I/O graph is continous and the details show processes like ARC0, ARC1, LGWR(log file sequential read, db file parallel write are the most active ones) . Also Phsycal Reads are very inconsistent and can exceed 30000 KB at times. Undo tablespace is full nearly all of the time causing ORA-01555.
    The above symptoms have all began today. The database is closed at 3:00 am to take offline backup and opened at 6:00 am everyday.
    Nothing has changed on the database(9.2.0.8), applications(11.5.10.2) or OS(AIX 5.3).
    What is the reason of this most senseless behaviour? Please help me.
    Thanks in advance.
    Regards.
    Burak

    Selam Burak,
    High number of archive logs are being created because you may have massive redo creation on your database. Do you have an application that updates, deletes or inserts into any kind of table?
    What is written in the alert.log file?
    Do you have the undo tablespace with the guarentee retention option btw?
    Have you ever checked the log file switch sequency map?
    Please use below SQL to detirme the switch frequency;
    SELECT * FROM (
    SELECT * FROM (
    SELECT   TO_CHAR(FIRST_TIME, 'DD/MM') AS "DAY"
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '00', 1, 0)), '999') "00:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '01', 1, 0)), '999') "01:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '02', 1, 0)), '999') "02:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '03', 1, 0)), '999') "03:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '04', 1, 0)), '999') "04:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '05', 1, 0)), '999') "05:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '06', 1, 0)), '999') "06:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '07', 1, 0)), '999') "07:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '08', 1, 0)), '999') "08:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '09', 1, 0)), '999') "09:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '10', 1, 0)), '999') "10:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '11', 1, 0)), '999') "11:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '12', 1, 0)), '999') "12:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '13', 1, 0)), '999') "13:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '14', 1, 0)), '999') "14:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '15', 1, 0)), '999') "15:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '16', 1, 0)), '999') "16:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '17', 1, 0)), '999') "17:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '18', 1, 0)), '999') "18:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '19', 1, 0)), '999') "19:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '20', 1, 0)), '999') "20:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '21', 1, 0)), '999') "21:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '22', 1, 0)), '999') "22:00"+
    +, TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '23', 1, 0)), '999') "23:00"+
    FROM V$LOG_HISTORY
    WHERE extract(year FROM FIRST_TIME) = extract(year FROM sysdate)
    GROUP BY TO_CHAR(FIRST_TIME, 'DD/MM')
    +) ORDER BY TO_DATE(extract(year FROM sysdate) || DAY, 'YYYY DD/MM') DESC+
    +) WHERE ROWNUM < 8+
    Ogan

  • IPhoto book: Deleting Pages and Back Cover Problems?

    I am creating a book iphoto.  I was all set with 100 pages and then the back flap and cover.  Somehow, there is an extra page at the end and then the back flap and back cover are also now set as page, making my book 103 pages.  I know this is not possible.  Anyone able to offer any help?
    Thanks!

    If you don't get an answer here soon you can check the separate iPhoto Forum https://discussions.apple.com/community/ilife/iphoto

  • Script to delete old folders from an archive directory

    Hi, I am new to powershell scripting, working on a script to purge older folders after the files in these folders are processed. I would want to set a limit lets say 15 days old. Any help is greatly appreciated.
    Thanks in advance...........
    Ione

    Here's something you can play with:
    $folder = 'C:\NetworkShare\Archive'
    $cutoffDate = (Get-Date).AddDays(-15)
    Get-ChildItem -Path $folder -File |
    Where { $_.LastWriteTime -lt $cutoffDate } |
    Remove-Item -WhatIf
    This will only attempt to delete the files in your specified folder. The -File switch does need at least v3 of PowerShell.
    If you're happy with the output, remove the -WhatIf switch to actually do the deletion.
    EDIT: Ah, I see I'm slow on the submit button. See above.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

Maybe you are looking for

  • Issue with Selection Listener when the table has only one row

    Hi All , I have developed a table in which I am using Selection Listener to perform some task when any row is selected. It is working fine when I have more than 1 row in the table, but when I have only one row in the table , the selection listener do

  • Setting Page Size as a Percentage vs. pixels for optimal viewing

    Is there a way to set the size of my web pages as percentages so that when viewer open my site, the pages will automatically resize itself to fit the computer on which it is being viewed? Thanks in advance! :)L

  • Printing exactly 2 decimal places

    I'm trying to print my double type variables to exactly 2 places. but numbers such as 3.00 and 124.00 keep printing as 3.0 and 124.0. Is there an easy way to force the printing to two decimal places on a primitive double type value without having to

  • VISION demo database creation scripts

    Does anyone have a copy of the VISION demo database creation scripts that they could give me. Have to try and add this into an already installed EBS system. rgds Alan

  • Audio just a whooshing sound in PP CS5

    Last night I created a sequence by importing a group of downloaded YouTube videos.  I finished the editing and it looked and sounded great.  I saved the project figuring I would go back to in the morning and export it.  When I reopened the project to