Rman backup archive log

Hi Guys,
Can advise on the syntax to perform rman backup of archive logs generated in last 2 days?
Should it be 1 or 2?
thanks!
1. BACKUP ARCHIVELOG UNTIL TIME 'SYSDATE-2';
2. BACKUP ARCHIVELOG FROM TIME 'SYSDATE-2';

What prevents you from trying both?
I'm not trying to be difficult here but why take the time to ask people in a forum, not even supplying a version number, and not just find out?
It took me less than 60 seconds to cut-and-paste both of your command lines into RMAN and look at the output.
Edited by: damorgan on Jan 19, 2013 4:11 PM

Similar Messages

  • RMAN backup archive logs on tape that has not been backuped yet...

    We are using RMAN with catalog on Legato. Oracle 10gR2.
    Our archive log backup is taking every 2 hours with scriipt:
    run {                                                            
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    send 'NSR_ENV=(NSR_SERVER=hitbackup.hit.hypohr,NSR_CLIENT=a22ff020.hit.hypobck)';
    # 0.0840278 = 121 minutes!
    backup archivelog FROM TIME = 'sysdate-0.0840278' filesperset 50 format '/arch1_%d_%u/';
    release channel t1;
    release channel t2;
    }In the night we take everyday full backup where we delete all 9 days old archive log which has been backuped on tape at least once. The script is following:
    run {
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    send 'NSR_ENV=(NSR_SERVER=hitbackup.hit.hypohr,NSR_CLIENT=a22ff020.hit.hypobck)';
    backup full database filesperset 2 format '/full_%d_%U/';
    release channel t1;
    release channel t2;
    allocate channel d2 type disk;
    delete archivelog until time 'trunc(sysdate)-9'
    backed up 1 times to device type SBT_TAPE;
    release channel d2;
    }Problem is that sometimes archive log backup is not performed (Legato head is busy with other backups or some restore that happened in the time when backup is scheduled and later 2hours frame is missing those logs) and then we backup them with some manual script.
    We'd like to know how to backup to tape all archive logs in last 5 days that has not been backuped once to tape. I.E:
    backup archivelog FROM TIME = 'sysdate-7' filesperset  50 format '/arch1_%d_%u/'
    backed up 0 times to device type SBT_TAPE;This part will be included in daily job...which should recollect all missing archive logs from last seven days.
    THX

    You could try to use the NOT BACKED UP x TIMES clause from BACKUP command.

  • Backup archive logs problem using RMAN

    Hi guys
    I got failure when using RMAN to backup archive log files:
    Starting backup at 20-APR-06
    current log archived
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 04/20/2006 21:53:57
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
    ORA-19625: error identifying file /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/o1_mf_1_1_21p5c251_.arc
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    RMAN> **end-of-file**
    My archive log files location:
    SQL> show parameter log_archive_dest
    NAME TYPE VALUE
    log_archive_dest_1 string LOCATION=/opt/oracle/oradata/DB10G/arch/
    Current archive log files:
    $ ls /opt/oracle/oradata/DB10G/arch
    1_17_586191737.dbf 1_21_586191737.dbf 1_25_586191737.dbf 1_29_586191737.dbf 1_33_586191737.dbf
    1_18_586191737.dbf 1_22_586191737.dbf 1_26_586191737.dbf 1_30_586191737.dbf 1_34_586191737.dbf
    1_19_586191737.dbf 1_23_586191737.dbf 1_27_586191737.dbf 1_31_586191737.dbf 1_35_586191737.dbf
    1_20_586191737.dbf 1_24_586191737.dbf 1_28_586191737.dbf 1_32_586191737.dbf afiedt.buf
    $
    But when I check v$archived_log:
    SQL> select name,status,deleted from v$archived_log;
    NAME S DEL
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    D YES
    /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/ A NO
    /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_18/ A NO
    /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_19/ A NO
    /opt/oracle/oradata/DB10G/redo01.log A NO
    /opt/oracle/oradata/DB10G/redo02.log A NO
    /opt/oracle/oradata/DB10G/redo03.log A NO
    /opt/oracle/oradata/DB10G/arch/1_5_585926175.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_6_585926175.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_7_585926175.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_1_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_2_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_3_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_4_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_5_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_6_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_7_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_8_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_9_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_10_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_11_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_12_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_13_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_14_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_15_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_16_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_17_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_18_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_19_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_20_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_21_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_22_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_23_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_24_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_25_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_26_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_27_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_28_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_29_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_30_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_31_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_32_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_33_586191737.dbf A NO
    /opt/oracle/oradata/DB10G/arch/1_34_586191737.dbf A NO
    More records than actual archived logs. How could it happen? How to solve?
    THanks in advance.
    Sharon

    Hi,
    Use
    RMAN>crosscheck archivelog all; cmd

  • COLD BACKUP을 받은 후 ARCHIVE LOG로 변환하여 사용한 경우 INCOMPLETE RECOVERY.

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-09
    COLD BACKUP을 받은 후 ARCHIVE LOG로 변환하여 사용한 경우 INCOMPLETE RECOVERY.
    ======================================================================
    PURPOSE
    COLD BACKUP을 받은 후 ARCHIVE LOG MODE로 변환하여 사용한 경우의 RECOVERY
    과정을 TEST로 확인하여 본다.
    Examples
    No Archive log mode.
    SQL> select * from tab ;
    TNAME TABTYPE CLUSTERID
    EMP TABLE
    EMP1 TABLE
    EMP2 TABLE
    EMP3 TABLE
    EMP4 TABLE
    10 rows selected.
    SQL> select count(*) from emp3 ;
    COUNT(*)
    0
    SQL> select count(*) from emp4 ;
    COUNT(*)
    0
    Cold backup을 받은후 Archive log mode 변경한 경우
    SVRMGR> startup mount
    SVRMGR> archive log list
    Database log mode No Archive Mode
    Automatic archival Enabled
    Archive destination D:\Oracle\oradata\SNAP\archive
    Oldest online log sequence 26
    Current log sequence 28
    SVRMGR> alter database archivelog ;
    SVRMGR> alter database open ; => archive log mode 변경.
    SQL> select * from tab ;
    TNAME TABTYPE CLUSTERID
    EMP TABLE
    EMP1 TABLE
    EMP2 TABLE
    EMP3 TABLE
    EMP4 TABLE
    10 rows selected.
    SQL> insert into emp3 select * from emp ;
    14 rows created.
    SQL> commit ;
    Commit complete.
    SQL> insert into emp4 select * from emp1 ;
    71680 rows created.
    SQL> commit ;
    Commit complete.
    SQL> select count(*) from emp3 ;
    COUNT(*)
    14
    SQL> select count(*) from emp4 ;
    COUNT(*)
    71680
    ## log switch 발생.
    SVRMGR> alter system switch logfile ;
    SQL> insert into emp3 select * from emp ; -- current log에 반영.
    14 rows created.
    SQL> commit ;
    SQL> select count(*) from emp3 ;
    COUNT(*)
    28
    SQL> select count(*) from emp4 ;
    COUNT(*)
    71680
    # ALL DATABASE CRASH #
    # recover 과정... #
    1. Restore Cold-backup
    2. modify initSID.ora
    log_archive_start = true
    log_archive_dest_1 = "location=D:\Oracle\oradata\SNAP\archive"
    log_archive_format = %%ORACLE_SID%%T%TS%S.ARC
    3. svrmgrl
    Statement processed.
    SVRMGR> startup mount
    ORACLE instance started.
    Total System Global Area 40703244 bytes
    Fixed Size 70924 bytes
    Variable Size 23777280 bytes
    Database Buffers 16777216 bytes
    Redo Buffers 77824 bytes
    Database mounted.
    SVRMGR> archive log list
    Database log mode No Archive Mode
    Automatic archival Enabled
    Archive destination D:\Oracle\oradata\SNAP\archive
    Oldest online log sequence 26
    Current log sequence 28
    SVRMGR> alter database archivelog ;
    Statement processed.
    SVRMGR> recover database using backup controlfile until cancel ;
    ORA-00279: change 340421 generated at 04/29/2001 23:42:20 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00028.ARC
    ORA-00280: change 340421 for thread 1 is in sequence #28
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    Log applied.
    ORA-00279: change 340561 generated at 04/29/2001 23:47:29 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00029.ARC
    ORA-00280: change 340561 for thread 1 is in sequence #29
    ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00028.ARC' no longe
    r needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    Log applied.
    ORA-00279: change 340642 generated at 04/29/2001 23:47:35 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00030.ARC
    ORA-00280: change 340642 for thread 1 is in sequence #30
    ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00029.ARC' no longe
    r needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    Log applied.
    ORA-00279: change 340723 generated at 04/29/2001 23:47:40 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00031.ARC
    ORA-00280: change 340723 for thread 1 is in sequence #31
    ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00030.ARC' no longe
    r needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    Log applied.
    ORA-00279: change 340797 generated at 04/29/2001 23:48:01 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00032.ARC
    ORA-00280: change 340797 for thread 1 is in sequence #32
    ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00031.ARC' no longe
    r needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    Media recovery cancelled.
    SVRMGR> alter database open resetlogs ;
    Statement processed.
    SVRMGR>
    SQL> connect scott/tiger
    SQL> select count(*) from emp3 ;
    COUNT(*)
    14
    SQL> select count(*) from emp4 ;
    COUNT(*)
    71680
    # 결론...... #
    따라서 current log file에 기록된 14 row에 대한 부분은 recover가 될수
    없지만 archive log file에 적용된 log에 대한 data는 정상적으로 복구가
    가능하다.
    # 주의 사항 #
    cold backup을 restore한 후 database open후 shutdown 한 다음 archive
    log mode로 변경하여 recover를 진행하는 경우 SCN number가 변경되기
    때문에 ora-600 error가 발생하며 media recovery를 필요로 하기 때문에
    주의하여야 한다.
    SVRMGR> startup
    ORACLE instance started.
    Total System Global Area 40703244 bytes
    Fixed Size 70924 bytes
    Variable Size 23777280 bytes
    Database Buffers 16777216 bytes
    Redo Buffers 77824 bytes
    Database mounted.
    Database opened.
    SVRMGR> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SVRMGR> startup mount
    ORACLE instance started.
    Total System Global Area 40703244 bytes
    Fixed Size 70924 bytes
    Variable Size 23777280 bytes
    Database Buffers 16777216 bytes
    Redo Buffers 77824 bytes
    Database mounted.
    SVRMGR> alter database archivelog ;
    Statement processed.
    SVRMGR> recover database using backup controlfile until cancel ;
    ORA-00279: change 339542 generated at 04/29/2001 23:30:57 needed for thread 1
    ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00003.ARC
    ORA-00280: change 339542 for thread 1 is in sequence #3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00283: recovery session canceled due to errors
    ORA-00600: internal error code, arguments: [3020], [8390146], [1], [3], [143], [
    240], [], []
    SVRMGR> exit
    Server Manager complete.
    Rederence Documents
    ---------------------

  • Error when I backup with rman plus archive log

    Hi All,
    I tried below command
    run {
    SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    BACKUP DATABASE INCLUDE CURRENT CONTROLFILE PLUS ARCHIVELOG DELETE ALL INPUT;
    and that show below error
    archived log file name=+DATA/pimprd/archivelog/pimarch_2_95_698703544.arc RECID=128 STAMP=706186164
    archived log file name=+DATA/pimprd/archivelog/pimarch_2_96_698703544.arc RECID=130 STAMP=706186173
    Finished backup at 21-DEC-09
    ORACLE error from target database:
    ORA-03114: not connected to ORACLE
    Starting backup at 21-DEC-09
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=259 instance=pimdb1 device type=DISK
    channel ORA_DISK_1: starting archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=153 RECID=113 STAMP=705896703
    input archived log thread=1 sequence=154 RECID=116 STAMP=705983105
    input archived log thread=1 sequence=155 RECID=119 STAMP=706069504
    archived log file name=+DATA/pimprd/archivelog/pimarch_2_95_698703544.arc RECID=128 STAMP=706186164
    archived log file name=+DATA/pimprd/archivelog/pimarch_2_96_698703544.arc RECID=130 STAMP=706186173
    Finished backup at 21-DEC-09
    ORACLE error from target database:
    ORA-03114: not connected to ORACLE
    Starting backup at 21-DEC-09
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    ORA-03114: not connected to ORACLE
    RMAN-03002: failure of backup plus archivelog command at 12/21/2009 11:00:18
    ORA-03114: not connected to ORACLE
    There are RAC 11.1.0.6.0 on AIX 5.3 with ASM.
    Please advise,
    Thank you,
    Hiko

    ็Hi All,
    I tried backup archivelog again and show same error,
    Line: -----
    rman target /
    Recovery Manager: Release 11.1.0.6.0 - Production on Mon Dec 21 14:48:29 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    connected to target database: PIMDB (DBID=3834713912)
    RMAN> run
    2> {
    3> backup archivelog all;
    4> }
    Starting backup at 21-DEC-09
    current log archived
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=275 instance=pimdb1 device type=DISK
    channel ORA_DISK_1: starting archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=161 RECID=131 STAMP=706190624
    input archived log thread=1 sequence=162 RECID=133 STAMP=706200525
    input archived log thread=2 sequence=97 RECID=132 STAMP=706190625
    input archived log thread=2 sequence=98 RECID=134 STAMP=706200526
    channel ORA_DISK_1: starting piece 1 at 21-DEC-09
    channel ORA_DISK_1: finished piece 1 at 21-DEC-09
    piece handle=/oradata/backup/pimdb/rman/pimdb_Fulldata_20091221_97_1.bck tag=TAG20091221T144854 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 21-DEC-09
    Starting Control File and SPFILE Autobackup at 21-DEC-09
    piece handle=/oradata/backup/pimdb/rman/pimdb_Controlfile_c-3834713912-20091221-02 comment=NONE
    Finished Control File and SPFILE Autobackup at 21-DEC-09
    ORACLE error from target database:
    ORA-03114: not connected to ORACLE
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    ORA-03114: not connected to ORACLE
    RMAN-03009: failure of REFAF command on default channel at 12/21/2009 14:59:33
    ORA-03114: not connected to ORACLE
    RMAN> exit
    Recovery Manager complete.
    Line: -----
    And I check in alert log file that show below error
    Line: -----
    Mon Dec 21 14:48:44 2009
    Thread 1 advanced to log sequence 163
    Current log# 1 seq# 163 mem# 0: +DATA/pimdb/onlinelog/group_1.282.698703549
    Mon Dec 21 14:49:17 2009
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x3E00000000] [PC:0x10180AA48, kxfpg1srv()+04e8]
    Errors in file /oracle/diag/rdbms/pimdb/pimdb1/trace/pimdb1_ora_5095646.trc (incident=64044):
    ORA-07445: exception encountered: core dump [kxfpg1srv()+04e8] [SIGSEGV] [ADDR:0x3E00000000] [PC:0x10180AA48] [Address not mapped to object] []
    Incident details in: /oracle/diag/rdbms/pimdb/pimdb1/incident/incdir_64044/pimdb1_ora_5095646_i64044.trc
    Mon Dec 21 14:49:31 2009
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x3E00000000] [PC:0x10180AA48, kxfpg1srv()+04e8]
    Errors in file /oracle/diag/rdbms/pimdb/pimdb1/trace/pimdb1_m000_1831050.trc (incident=64163):
    ORA-07445: exception encountered: core dump [kxfpg1srv()+04e8] [SIGSEGV] [ADDR:0x3E00000000] [PC:0x10180AA48] [Address not mapped to object] []
    Incident details in: /oracle/diag/rdbms/pimdb/pimdb1/incident/incdir_64163/pimdb1_m000_1831050_i64163.trc
    Mon Dec 21 14:49:33 2009
    Trace dumping is performing id=[cdmp_20091221144933]
    Mon Dec 21 14:49:34 2009
    Sweep Incident[64163]: completed
    Mon Dec 21 14:59:33 2009
    Process 0x70000020477df88 appears to be hung while dumping
    Current time = 1584185732, process death time = 1584124482 interval = 60000
    Attempting to kill process 0x70000020477df88 with OS pid = 5095646
    OSD kill succeeded for process 70000020477df88
    Line: -----
    Please advice,
    Thank you
    Hiko

  • 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 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 --

  • Need a shell script to backup archive log daily

    Hi All,
    We need a shell script to backup the archive logs daily after shutting down the concurrent manager and once the backup is completed, needs to start the concurrent manager through the script itself, if you have any ideas or sample scripts, please provide and help us.
    The objective is to backup the daily archive logs with out any loss of data.
    Thanks,

    I do not have a similar script to share, sorry. However, you may review the following links/notes:
    Note: 137181.1 - RMAN Backup Shell Script Example
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=137181.1
    Recovery Manager (RMAN) Manuals
    http://www.oracle.com/pls/db102/homepage

  • RMAN Backup Archieve log

    We are using rman to backup the archive log files. Due to space constraints in the disk, all the existing archivelog files are moved to another drive. In the init.ora also, the new archive log location is changed. Now we are not able to take backup of the old archive log files using backup command of rman. Since the control file is having the old location for archive log. How to take backup of these files from the new location in the disk. Whether backup archivelog like '' will be useful in this situation.

    Dear user7277731,
    Consider using the flash recovery area.
    Define db_recovery_area_dest and db_recovery_area_dest_size in order to automatically delete the archivelogs. Archivelogs will be deleted from the location that you have defined when the recovery area destination size is near 100%.
    You may also use;
    crosscheck archivelog all;
    delete noprompt expired archivelog all;hope it helps,
    Ogan

  • 91 Database - When to Backup Archive Logs?

    hi experts,
    I have a 9i db that runs in Archive mode. NOT using the catalog.
    A full database backup is made by RMAN at 7am while database is OPEN.
    An incremental backup are made every 3 hours.
    For RMAN to be able to perform a complete recovery, when should I backup the archive logs?
    Thanks, John

    Thanks Khurran and Anvar.
    As I'm new to Oracle (my background is SQL Server), I admit I'm a bit confused about the use of archive logs.
    I had a situation last week, where I needed to restore (to another server) froma backup made at month-end. I had the whole db backup but it was made while db was open. Therefore I needed to also restore the archive log(s) but did not have them. In the end, I had to restore db and force it to open. it was messy and not at all easy.
    My recovery window is 2 days.
    If I do the following, will I be able to restore to a point in time for the past 2 days?
    - controlfile is set for autobackup
    - run RMAN> backup databse plus archivelog; once per day, then run my incremental backup every 3 hours
    Thanks for your opinions. John

  • Recovery using Full BCV backup & archive logs

    Hello DBA's ,
    I have Last Sunday's Full BCV (Buisness Copy Volume) backup (i.e. ..... the tablespaces were taken into Backup mode then Sync the BCV, then split the BCV , take the backup of BCV and take the tabespaces in normal mode in short what we call as HOT BACKUP ........ ) & also I am taking only archive log & control file backup Daily.
    Now I want to Run my database on Different Server using the above FULL BCV & daily backed up Archive logs & Control file.
    Kindly update me- Can I go for following recovery steps for above scenario.
    1) Install ORACLE software on new server.
    2) Restore the last Sunday's FULL BCV (Hot backup)
    3) Restore the archive log from last Sunday's Full BCV backup.
    4) Restore the latest backed up control file.
    5) Mount the database.
    6) Recover the database using backed up control file & archive logs.
    7) Open the database with RESETLOGS option.
    Please Guide me whether I can Fully Recover/Start database on this new server using above steps. ---OR---- " Are there any more files except data files that need to be backed up daily after Full BCV ? " ---OR ---- More suggestions are Welcome.
    I want to test this scenario bcz.
    a) I can't afford daily BCV due to lack of storage with current retention given by buisness.
    b) I can't afford long time taken by RMAN for backup & recovery, as it disturbs my other backup shedules, also RTO should be very low as per my buisness requirement.
    c) Currently we are not thinking for any another Backup options.
    OS platform -- SOLARIS 10
    Database version -- ORACLE 9i/10g
    Atul.

    Hello everybody ....
    Actually I am doing the above scenario practically and I am facing the problem that when I am applying my archive logs using backup controlfile until cancel, the recovery completes upto the available Archive logs/sequence. But it throws the following error along with it ......
    ORA-00279: change 7001791222 generated at 01/13/2008 07:23:42 needed for thread
    1
    ORA-00289: suggestion : /oracle/EPR/oraarch/1_9623_601570270.dbf
    ORA-00280: change 7001791222 for thread 1 is in sequence #9623
    ORA-00278: log file '/oracle/EPR/oraarch/1_9622_601570270.dbf' no longer needed
    for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00279: change 7001816252 generated at 01/13/2008 12:53:05 needed for thread
    1
    ORA-00289: suggestion : /oracle/EPR/oraarch/1_9624_601570270.dbf
    ORA-00280: change 7001816252 for thread 1 is in sequence #9624
    ORA-00278: log file '/oracle/EPR/oraarch/1_9623_601570270.dbf' no longer needed
    for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/oracle/EPR/sapdata1/system_1/system.data1'
    SQL> SQL> SQL> SQL> SQL> SQL> SQL>
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/oracle/EPR/sapdata1/system_1/system.data1'
    So, I opened my database using Last (Sunday's) full hot backup only and it opens successfully without applying any archives.
    Now, my question is... why my database doesn't open with OPEN RESETLOGS option when I am recovering it using command " RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE; "
    I want to recover my database upto Saturday then What should I do ?
    Please help me out !
    Atul.

  • RMAN and archived log

    I have 2 identical Database from day 1 (1 Prod and 1 Dev). Prod db runs in archive mode
    which produces a number of archived logs after a few hours.
    Can I use rman to apply these archived log to the Dev instance to get a copy of the Prod DB? I've copied all *.arc files rom
    Prod back to Oracle\oradata\devdb directory
    1. rman target internal/<passwd> nocatalog
    2. shutdown normal;
    3. startup mount pfile=init.ora
    4. run {
    allocate channel ch1 type disk;
    restore archivelog from logseq 11 until logseq 13;
    recover database;
    I am getting an error saying
    RMAN 06050: archivelog thread 1 sequence 11 is already on disk ....
    RMAN 06177: restore not done, all files readonly, offline or already restored?
    Thanks
    null

    Hi!
    The quick answer is no. But there are several things to know.
    1. Production Database in archive mode.
    2. Develpment database in no archive mode?
    You cannot apply the redo log of (1) to (2) because the SCN (sequence change number) and won't be the same in the both databases. Means more, except if you clone the databases, the control files could be different so remember that redo-logs are binaries, not just a clear-text script.
    Other think to know is that in development you can modify, delete apppend data/tables/datafiles/tablespaces.. how can synchronize this with the production? (this situation can be the same production vs development).
    If you have a standby database you can do something like you wish, but not identical (tell me and I will explain my little knowledge about it ;)
    So you must first know what do you wanna keep in development database, if you just want to have a daily-mirror and can lost production data the best option is to backup production database with RMAN (full, incremental...) in development and use it to replicate another instance every day. Well I have some troubles replicating with RMAN, but people here say it's possible ;)
    If you want to keep the same data, you can use an incremental data export (exp utility) and import modified data to development.
    A10!
    P.S:Sorry for this loooooong text ;)

  • Full backup and backup archive logs

    Hello,
    today in the early morning i did backup of my db with :
    RMAN> backup as COMPRESSED BACKUPSET DATABASE format '/backup/%d_t%t_s%s_p%p';This command created two files :
    [oracle@p1 backup]$ ls -l
    total 1132680
    -rw-r-----  1 oracle oinstall 1155940352 Sep 14 00:44 TEST_t697508918_s5_p1
    -rw-r-----  1 oracle oinstall    2785280 Sep 14 00:44 TEST_t697509873_s6_p1Did i backed up archive logs also with this command ?
    If I did not, do i have to i n order to have everything to do complete resterer and recovery ?
    Is now to late to backup them?

    Can you confirm that this backup will be placed in the FRA, it will backup all datafile, control files, spfile and control files all arhchivle logs and when backup finshes then will delete all archive logs ?+
    after running that command yo can confirm it by yourself at RMAN prompt.
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    200     Full    509.78M    DISK        00:01:03     15-FEB-07
            BP Key: 202   Status: AVAILABLE  Compressed: NO  Tag: TAG20070215T171219
            Piece Name: /disk2/PROD/backupset/2007_02_15/o1_mf_nnndf_TAG20070215T171219_2xb17nbb_.bkp
      List of Datafiles in backup set 200
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 421946     15-FEB-07 /disk1/oradata/prod/system01.dbf
      2       Full 421946     15-FEB-07 /disk1/oradata/prod/sysaux01.dbf
      3       Full 421946     15-FEB-07 /disk1/oradata/prod/undotbs01.dbf
      4       Full 421946     15-FEB-07 /disk1/oradata/prod/cwmlite01.dbf
      5       Full 421946     15-FEB-07 /disk1/oradata/prod/drsys01.dbf
      6       Full 421946     15-FEB-07 /disk1/oradata/prod/example01.dbf
      7       Full 421946     15-FEB-07 /disk1/oradata/prod/indx01.dbf
      8       Full 421946     15-FEB-07 /disk1/oradata/prod/tools01.dbf
      9       Full 421946     15-FEB-07 /disk1/oradata/prod/users01.dbf
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    201     Full    7.98M      DISK        00:00:03     15-FEB-07
            BP Key: 203   Status: AVAILABLE  Compressed: NO  Tag: TAG20070215T171219
            Piece Name: /disk2/PROD/backupset/2007_02_15/o1_mf_ncsnf_TAG20070215T171219_2xb19prg_.bkp
      SPFILE Included: Modification time: 15-FEB-07
      SPFILE db_unique_name: PROD
      Control File Included: Ckp SCN: 421968       Ckp time: 15-FEB-07
    BS Key  Size       Device Type Elapsed Time Completion Time
    227     30.50M     SBT_TAPE    00:00:11     15-FEB-07
            BP Key: 230   Status: AVAILABLE  Compressed: NO  Tag: TAG20070215T171334
            Handle: 0bia4rtv_1_1   Media:
      List of Archived Logs in backup set 227
      Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
      1    5       389156     15-FEB-07 411006     15-FEB-07
      1    6       411006     15-FEB-07 412972     15-FEB-07
      1    7       412972     15-FEB-07 417086     15-FEB-07
      1    8       417086     15-FEB-07 417114     15-FEB-07
      1    9       417114     15-FEB-07 417853     15-FEB-07
      1    10      417853     15-FEB-07 421698     15-FEB-07
      1    11      421698     15-FEB-07 421988     15-FEB-07list backup will show you everything.
    Would then this be incremental level 0 backup ?
    yes by default i think so.
    so with this i must be able to flasback my database at least 3 day in the past if i understood correctly.
    But i am little puzled about purging those flasback data ...
    Can you point me please to some link or tell how can i purge logs that are not need for that flashback period... ?
    please read this link
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb003.htm#sthref513
    Khurram

  • Scripted Cold Backups / Archived Logs / Flashback

    Facts:
    uname -a:
    SunOS {hostname omitted} 5.8 Generic_117350-39 sun4u sparc SUNW,Sun-Fire-V240
    select * from v$version:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Archivelog enabled
    Flashback enabled
    db_flashback_retention_target = 7200 (5 days)
    archive_lag_target = 1800 (30 minutes)
    No, we are not using rman (yet). This system does not have a 24/7 SLA, so we run a cold backup every Saturday: a shell script shuts down the database and copies all the necessary files to a safe location on another host.
    We do have one problem: an accumulation of archived logs. I know that we don't need to keep the logs older than the latest cold backup, but I am unsure of the correct way to clean them up, especially given that we have flashback enabled. Any suggestions?
    Thanks!

    I think maybe I just found the answer to my own question.
    Upon examining the flashback_recovery_area more closely, I see an archivelog directory and a flashback directory, which contains a number of flb files going back to 12/14 (today is 12/20). This makes a certain amount of sense since we have the flashback retention target set to 5 days.
    Would I be correct in stating that the flashback files are self-managing and completely independent of the archived logs?
    Would I also be correct in stating that I can happily delete the archive logs older than my last cold backup?
    The thing which gives me pause is that I swear I remember reading somewhere that flashback uses the archived logs. Did I misunderstand something?

  • Hot Backup & Archive log

    I got a doubt here.
    I am scheduling a online backup everynight.Is it enough to keep the archive log files upto nextdays backup.
    10PM backup starts
    then archive logs will be backed up.next day 10PM again full backup starts so is it just enough to maintain One day archivelogs.

    Once i take full backup next day can i remove the a day old archive logsbackup.Backup of what. Archivelogs or Whole Database.
    9,10 backed up by veritas 11d for 8i i am using user managed backupsI would still recommened to use RMAN, even for 8i database.
    hare krishna
    Alok

Maybe you are looking for