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.

Similar Messages

  • 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

  • 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

  • How to remove archive log files from ASM managed 11g R2 database?

    Hi,
    I am planning to automate deletion of older archive log files from my 11g R2 Production instance which is ASM managed.
    Also want to remove the archive log files files from standby database.
    Please provide your inputs on how can I remove the older archive log files.
    Regards,
    Avinash

    Greetings
    Did you check RMAN,
    RMAN>show all;
    CONFIGURE RETENTION POLICY . . . .
    CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
    DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
    DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-10';
    This will be part of your RMAN Backup scripts/process
    Check the urls below:
    11gRel2:
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#BRADV90079
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#BRADV89634
    10g:
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14193/toc.htm#sthref45
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1008093
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/maint003.htm#sthref712
    Regards & Thanks
    BN

  • How to delete the data in archived log files

    hi
    how can i delete the enteries in archived log files. and what is the disadvantage of deleting archived log enteries.

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • Sync database using archive log files

    Hi,
    I am having two databases A nd B. A is the live Database. I need to replicate the A database and its name as B. I had done the replication using hotbackup.
    1. create the B database
    2. then take the hotbackup and copy the files to the B database
    3. Then delete the controlfile, logfiles and datafiles then paste the files from A database.
    4. Recreate the control files in B database
    5. Now the B database is up and running.
    But my question is in A database is still live and its generating archive log files. I would like to know how to sync the B Database similar to A database using archive log files.
    Kindly share me an example..
    Rgds..

    As you have renamed and opened the clone database, it is no longer the same DBID / Database Incarnation as the source. As you point out, it is not a standby database.
    You cannot apply archivelogs from the source database to this clone.
    You have to consider [Oracle Streams|http://download.oracle.com/docs/cd/B19306_01/server.102/b14229/toc.htm] to implement data replication.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jan 5, 2010 3:34 PM

  • How to Recover database from old backup and full archive log file

    Hi Oracle expert!
    I met problem when restore my oracle database.
    In my case:
    - My database version: 10.2.0.2
    - I have a database full backup (01-Nov)
    - I have all Archived log file from (01-Nov -> 05-Nov)
    - My database drop in 05-Nov with disk error (no datafile, no redo..).
    - I have no any RMAN backup from (01-Nov -> 05-Nov)
    How can i restore my database to 05-Nov?
    Thanks

    user10280724 wrote:
    Hi Chinar.
    When i used RMAN flow as your step, but i met the problem!
    - After recover database i select sequence#, applied from v$archived_log;
    --> it apply newest archived log that i had.
    - but when I select Data from table created between 01-Nov to 05-Nov, it not found!
    Not the same way the step:
    SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL?
    It apply newest the same archived log i had table created between 01-Nov to 05-Nov.
    How can i do with RMAN to recover my table?That is not possible,if your all available archive logs applied using rman or through sqlplus(recover database using backup controlfile until cancel) and one of these logs contain your table then there are not any problems.So there are not any difference between recovery using rman and user managed(using sqlplus),but there main matter is applying all archive logs.So first check through rman list copy of archivelog all or list backup of archivelog all and identify there in rman repository is any information or not about these logs.

  • How to remove archive log files using Enterprise Manger

    Hi,
    I took backup of the archive log files and i deleted those files at OS level but it is not reflecting in the Enterprise Manager it is showing the same. Can any one help in how to delete the archive log files by using Enterprise Manger.
    version 10.2.0.1.0
    any help is appreciated.
    Regards,
    Ashraf

    I have the same problem. I have 10gr1 and 10gr2 on different servers. On 10gr1, under administration/manage current backup/image, I can see archivelog files, and can mange them. But on 10gr2, the image doesn't show archivelog files. I can only remove them using rman. I wonder if it's because the different design on 10gr2 or I missed something when setup the backup?

  • Removing archived log files

    Hello all,
    Using Oracle 10g R2 ( 10.2.4.0) under UNIX Sun Solaris 10 , I have two rman backup types
    1-L0 backup
    2-L1 Backup ( Incremental cummulative)
    Facts:
    -Due to space pressure on archived log destination I'm trying to get less archived files possible under the archived log fs thus at any given time the archived log files destination contains archived log files aged no more than 22hours.
    * The backup runs each day at 4PM and there is custom script that remove and compressed archived log files ( out of backup jobs windows) from midnight until 3:45PM
    * From the above removal schedule task L0 or L1 backup will always have 24 hours worth of archived log files available during the backup.
    -The Backup files Windows retention period is 22 hours meaning that each backup type L0 or L1 removes previous backup files aged more than 22hours.
    -Tracking file is enabled
    Target:
    Knowing that our backup retention windows is 22hours.
    Our next goal is to get less than 2 hours from 24 hours of archived log files available when L0 or L1 backup.
    Would this affect L1 backup? and how?
    Thank in advance for your response
    Alex

    user8979607 wrote:
    Hello all,
    Using Oracle 10g R2 ( 10.2.4.0) under UNIX Sun Solaris 10 , I have two rman backup types
    1-L0 backup
    2-L1 Backup ( Incremental cummulative)
    Facts:
    -Due to space pressure on archived log destination I'm trying to get less archived files possible under the archived log fs thus at any given time the archived log files destination contains archived log files aged no more than 22hours.
    * The backup runs each day at 4PM and there is custom script that remove and compressed archived log files ( out of backup jobs windows) from midnight until 3:45PM
    * From the above removal schedule task L0 or L1 backup will always have 24 hours worth of archived log files available during the backup.
    -The Backup files Windows retention period is 22 hours meaning that each backup type L0 or L1 removes previous backup files aged more than 22hours.
    -Tracking file is enabled
    Target:
    Knowing that our backup retention windows is 22hours.
    Our next goal is to get less than 2 hours from 24 hours of archived log files available when L0 or L1 backup.
    Would this affect L1 backup? and how?
    Thank in advance for your response
    AlexI'm not sure what you are talking about with Backup files Windows retention period ... 22 hours".
    I don't know what you mean by "Our next goal is to get less than 2 hours from 24 hours of archived log files available when L0 or L1 backup."
    If you are not taking your database backups with rman you are on shaky ground. The principles are simple. To recover your database from a failure, you will need to start with an L0 backup. The rman RESTORE command will then restore individual blocks from any applicable and available L1 backups. You would follow that with a RECOVER command, that would attempt to apply all necessary redo from available archivelogs. If the necessary archivelogs have been deleted, rman will attempt to restore them from a backup. You can use rman to backup AND DELETE archivelog files to keep the archivelog destination cleaned out.
    I take an L0 backup once a week, an L1 the other 6 days, and archivelogs twice a day. The only time I've had a problem with the archivelog dest filling up is when some buggy code that has a loop goes into production and starts flooding redo.
    Exactly how are you taking your database backups? If you are not using rman, then you are already on shaky ground.

  • How to restore cold backup + archived log files

    Hi,
    Suppose I take a cold backup on 18th. After that I have four days of archived log files. if the database crashes on 5th day, I have to restore the 18th cold back + 4 days of archived log files. How do I restore since it is a cold backup and I cant do incomplete recovery.
    can I use
    Recover database ( with 18th cold backup) in mount state and apply archived logs.
    Prabhath

    The details of how you perform forward recovery using a cold backup depends on
    1- rman or manual backup
    2- using current or backup control file
    3- if rman, recovery catalog or no recovery catalog
    4- if full database recovered or only a few files
    Each of these conditions will affect what is known to Oracle and what needs to be done. For example if you restored the entire cold backup including the control file then Oracle would see a consistent database and not need to perform recovery so you would need to startup mount and tell the database to perform recovery using a backup control file. If using rman and no recovery catalog you might need to catalog some of the archived redo logs, etc....
    It is advisable to consult the Backup and Recovery manuals before attempting recovery for any new scenario.
    HTH -- Mark D Powell --

  • When to delete Archive Log files ? and is safe to delete ?

    Hi all,
    I have a question, my DB is running in Archive Log mode and is growing day by day, so should I delete archive log files and where i find that my which files are old and how to delete theses files, for info I also take full RMAN and export backup regularly .
    abbas

    Well, if you're not comfortable with Backup and Recovery principles, i'd advise you to first read TFM: Backup and Recovery Concept(click) for you data safety's sake.
    Anyway, just to give you a glance at what could happen, immagine suche a situation where your database is made of 5 different datafiles (whatever they are - SYSTEM, SYSAUX, UNDO, ...), controlfiles and online redo logs. If, for example your backup is done in a timeline such as:T0 : Backup datafile F1 and F2
    T1 : Backup datafile F2 and controlfile
    T2 : Backup datafile F3, F4
    T3 : Backup datafile F5
    T0' : Backup datafile F1 and F2
    T1' : Backup datafile F2 and controlfile
    T2' : Backup datafile F3, F4
    T3' : Backup datafile F5
    ...If your server crashes (for example is thrown though the 5th floor window..) in order to make a full recovery, you could proceed multiple ways.
    . Restore files from Tx' backups. Then you'd need every archived redo logs created from T0' to now in order to be able to do a full recovery.
    . Restore files from backups; T3, T0', T2' and rectreate controlfile. Then you'd need every archived redo log created from T3 (inclusive).
    . Restore Tx backup, ...
    . Restore ...
    and so on.
    What's important is that you're at least able to resynch a full-set backup. What I mean is: if you restored "T3, T0', T2' and rectreate controlfile", in order to open the database you'll absolutely need every archived redo log created between T3 and T2' inclusive. If one is missions, you won't be able to open it.
    That is the principle. Read the concept book I linked to get more infos.
    Regards,
    Yoann.

  • Archived log file are not shifted to standby side and applied

    Hi Guru's,
    DB
    My OS Version:Windows Server 2003
    DB Version:11.2.0.1.0
    I am trying to create Physical Standby DB on my test machine after setting all the parameters and start standby db in mount mode when i do the verification of archived log files that need to be shift from pri site to standby site i am getting:
    no rows selected.
    I am following the below mentioned doc for reference
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#i63561
    Can anyone from your side can help me to sort out this problem.
    Thanks in advance

    vk82 wrote:
    SQL> select max(sequence#) from v$archived_log;
    MAX(SEQUENCE#)
    39
    SQL> select process,status,sequence# from v$managed_standby;
    PROCESS STATUS SEQUENCE#
    ARCH CLOSING 38
    ARCH CLOSING 36
    ARCH CONNECTED 0
    ARCH CLOSING 37
    SQL> select max(sequence#) from v$archived_log where applied='YES';
    MAX(SEQUENCE#)
    39
    Yes the max sequence generated on primary is same as the max sequence applied on standby.
    And what is MRP and why it is important can you please let me know abt thisWhenever you created standby database, Make a habit of tail to alert log file to monitor whats happening on the standby database, Besides MRP is an Media Recovery Process , which applies archies/redo on standby database.
    MRP can apply based on the redo transport, If you are using real-time apply then Redo will be writtened to the standby redo log files at the same time recovery will be performed by MRP process, If you are not using Real-Time apply then whenever a archive generated on primary that archive will be transported to the standby and applied on the standby database.
    It is recommended to use Realtime apply, so that you can avoid much data lost.
    However you are in 11gR2, You can use below query to monitor
    SQL> SELECT * FROM V$STANDBY_EVENT_HISTOGRAM WHERE NAME = 'apply lag'  AND COUNT > 0;
    NAME             TIME UNIT                  COUNT LAST_TIME_UPDATED
    apply lag           0 seconds                 431 08/05/2012 22:14:21
    apply lag           1 seconds                   7 08/05/2012 22:13:31
    SQL>Edited by: CKPT on Nov 6, 2012 6:49 PM

  • RAC(OPS) 환경 하에서 ARCHIVED LOG FILE을 BACKUP 받는 방법

    제품 : RMAN
    작성날짜 : 2004-11-26
    RAC(OPS) 환경하에서 양쪽 Node의 archived log file을 RMAN을 사용하여 동시에 BACKUP 받는 방법
    ======================================================================================
    ORACLE 9i 이전 버전
    Oracle 8i까지는 다음과 같은 Script를 통하여 Backup을 받을 수 있었습니다.
    1) Script Name: arch_backup.rcv
    run{
    allocate channel node_1 type disk connect 'system/manager@v92hp1';
    allocate channel node_2 type disk connect 'system/manager@v92hp2';
    backup filesperset 1
    (archivelog until time 'SYSDATE' thread 1 channel node_1)
    (archivelog until time 'SYSDATE' thread 2 channel node_2);
    release channel node_1;
    release channel node_2;
    2) 수행 방법
    $ rman target=system/manager catalog=rman_user/rmanpw cmdfile='arch_backup.rcv' log='arch_backup.log'
    ORACLE 9i 이후 버전
    그러나 Oracle9i 이상부터는 Archived file backup전에 다음과 같은 설정을 먼저
    해 주셔야만 합니다.
    1) Configuration 설정
    $ rman target=system/manager catalog=rman_user/rmanpw
    RMAN> Show all;
    RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    RMAN> configure default device type to disk;
    RMAN> configure channel 1 device type disk connect 'system/manager@v92hp1';
    RMAN> configure channel 2 device type disk connect 'system/manager@v92hp2';
    위 설정은 backup을 Disk에 받는 경우로 가정하고 device type을 모두 disk로 설정하였습니다.
    만일 backup solution을 사용하여 tape에 받는다면 device type을 'sbt_tape'으로 변경해 주시면 됩니다
    몇개의 Channel을 설정할 것인가에 따라 PARALLELISM의 값을 반드시맞춰 주어야 합니다.
    이것을 맞춰주지 않으면 다음과 같은 형태의 Error가 발생하면서 다른 Node의 archive file들을 인식하지
    못하게 됩니다.(실제로 Archived file들은 정상적으로 존재합니다)
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
    ORA-19625: error identifying file /u01/64bit/app/oracle/product/9.2.0/admin/V92HP/arch/arch1_146.dbf
    ORA-27037: unable to obtain file status
    HP-UX Error: 2: No such file or directory
    Additional information: 3
    위 설정은 한번만 수행해 주시면 됩니다.
    만일 CHANNEL을 잘못 설정하였으면 다음과 같은 명령으로 Clear 해 주시면 됩니다.
    RMAN> configure channel 1 device type disk clear;
    2)Archived file을 Backup 받습니다.
    RMAN> run { backup
    format='/u01/64bit/app/oracle/product/9.2.0/admin/V92HP/arch/%U'
    archivelog all delete input;
    ADDITIONAL INFORMATION(1)
    RAC 환경 하에서 일부 Archived file들이 OS에서 삭제 되었을 경우 다음과 같은 명령을 통하여
    validation check를 수행한 후에 backup을 수행하여 주십시요
    RMAN> allocate channel for maintenance type disk connect 'system/manager@v92hp1';
    RMAN> allocate channel for maintenance type disk connect 'system/manager@v92hp2';
    RMAN> crosscheck archivelog all;
    만약에 Configuration에서 이미 Channel을 설정해 주었다면
    Channel allocation 없이 바로 crosscheck명령어를 수행해 주시면 됩니다.
    ADDITIONAL INFORMATION(2)
    Channel Configuration 설정시에 Backup FORMAT을 함께 설정하려면 다음과 같은 형태로 수행합니다.
    RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    RMAN> configure default device type to disk;
    RMAN> configure channel 1 device type disk connect 'system/manager@v92hp1' FORMAT '/arch/bkup%t_s%s_s%p';
    RMAN> configure channel 2 device type disk connect 'system/manager@v92hp2' FORMAT '/arch/bkup%t_s%s_s%p';
    ADDITIONAL INFORMATION(3)
    Tape device를 사용할 경우 device type은 'sbt_tape'을 사용합니다.
    RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2;
    RMAN> configure default device type to 'sbt_tape';
    RMAN> configure channel 1 device type 'sbt_tape' connect 'system/manager@v92hp1' FORMAT 'bkup%t_s%s_s%p';
    RMAN> configure channel 2 device type 'sbt_tape' connect 'system/manager@v92hp2' FORMAT 'bkup%t_s%s_s%p';

  • Will RMAN delete archive log files on a Standby server?

    Environment:
    Oracle 11.2.0.3 EE on Solaris 10.5
    I am currently NOT using an RMAN repository (coming soon).
    I have a Primary database sending log files to a Standby.
    My Retention Policy is set to 'RECOVERY WINDOW OF 8 DAYS'.
    Question: Will RMAN delete the archive log files on the Standby server after they become obsolete based on the Retention Policy or do I need to remove them manually via O/S command?
    Does the fact that I'm NOT using an RMAN Repository at the moment make a difference?
    Couldn't find the answer in the docs.
    Thanks very much!!
    -gary

    Hello again Gary;
    Sorry for the delay.
    Why is what you suggested better?
    No, its not better, but I prefer to manage the archive. This method works, period.
    Does that fact (running a backup every 4 hours) make my archivelog deletion policy irrelevant?
    No. The policy is important.
    Having the Primary set to :
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBYBut set to "NONE" on the Standby.
    Means the worst thing that can happen is RMAN will bark when you try to delete something. ( this is a good thing )
    How do I prevent the archive backup process from backing up an archive log file before it gets shipped to the standby?
    Should be a non-issue, the archive does not move, the REDO is transported and applied. There's SQL to monitor both ( Transport and Apply )
    For Data Guard I would consider getting a copy of
    "Oracle Data Guard 11g Handbook" - Larry Carpenter (AKA Dr. Paranoid ) ISBN 978-0-07-162111-2
    Best Oracle book I've read in 10 years. Covers a ton of ground clearly.
    Also Data Guard forum here :
    Data Guard
    Best Regards
    mseberg
    Edited by: mseberg on Apr 10, 2012 4:39 PM

  • How do I setup RMAN not to delete archive log files on the source database so GoldenGate can process DDL/DML changes?

    I want to setup RMAN not to delete any archive log files that will be used by GoldenGate.   Once GoldenGate is completed with the archive log file, the archive log file can be backup and deleted by RMAN.   It's my understanding that I can issue the following command "REGISTER EXTRACT <ext_name>, LOGRETENTION" to enable to functionally.   Is this the only thing I need to do to execute to enable this functionally?

    Hello,
    Yes this is the rigth way  using clasic capture.
    Using the command : REGISTER EXTRACT Extract_name LOGRETENTION.
    Create a Oracle Streams Group Capture (Artificial)  that prevent RMAN archive deletion if these are pending to process for Golden Gate capture process.
    You can see this integration doing a SELECT * FROM DBA_CAPTURE; after execute the register command.
    Then, when RMAN try to delete a archive file pending to process for GG this warning appear AT RMAN logs:
    Error:     RMAN 8317 (RMAN-08317 RMAN-8317)
    Text:     WARNING: archived log not deleted, needed for standby or upstream capture process.
    Then , this is a good manageability feature. I think is a 11.1 GG new feature.
    Tip. To avoid RMAN backup multiples times a archive pending to process, there is a option called BACKUP archivelog not backed 1 times.
    If you remove a Capture process that is registered with the database you need to use this comand to remove the streams capture group:
    unREGISTER EXTRACT extract_name LOGRETENTION;
    Then if you query dba_capture, the artificial Streams group is deleted.
    I hope help.
    Regards
    Arturo

Maybe you are looking for