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

Similar Messages

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

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

  • 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

  • Incomplete Recovery Fails using Full hot backup & Archive logs !!

    Hello DBA's !!
    I am doing on Recovery scenario where I have taken One full hot backup of my Portal Database (EPR) and Restored it on New Test Server. Also I restored Archive logs from last full hot backup for next 6 days. Also I restored the latest Control file (binary) to their original locations. Now, I started the recovery scenario as follows....
    1) Installed Oracle 10.2.0.2 compatible with restored version of oracle.
    2) Configured tnsnames.ora, listener.ora, sqlnet.ora with hostname of Test server.
    3) Restored all Hot backup files from Tape to Test Server.
    4) Restored all archive logs from tape to Test server.
    5) Restored Latest Binary Control file from Tape to Test Server.
    6) Now, Started recovery using following command from SQL prompt.
    SQL> recover database until cancel using backup controlfile;
    7) Open database after Recovery Completion using RESETLOGS option.
    Now in Above scenario I completed steps upto 5) successfully. But when I execute the step 6) the recovery completes with Warning : Recovery completed but OPEN RESETLOGS may throw error " system file needs more recovery to be consistent " . Please find the following snapshot ....
    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'
    Let me know What should be the reason behind recovery failure !
    Note : I tried to Open the database using Last Full Hot Backup only & not applying any archives. Then Database Opens successfully. It means my Database Installation & Configuration is OK !
    Please Let me know why my Incomplete Recovery using Archive logs Goes Fail ?
    Atul Patil.

    oh you made up a new thread so here again:
    there is nothing wrong.
    You restored your backup, archives etc.
    you started your recovery and oracle applyed all archives but the archive
    '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    does not exist because it represents your current online redo log file and that is not present.
    the recovery process cancels by itself.
    the solution is:
    restart your recovery process with:
    recover database until cancel using backup controlfile
    and when oracle suggests you '/oracle/EPR/oraarch/1_9624_601570270.dbf'
    type cancel!
    now you should be able to open your database with open resetlogs.

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

  • 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: How to apply Archive Logs after recoverying of all physical files

    Hi;
    I am using RMAN Oracle10g; my test database has being corrupted. I have already taken 0 level backup through this command
    run {
    allocate channel c1 type disk;
    backup incremental level 0 tag = Test_Weekly_database format 'O:\rman\backup\Full_Weekly_%d_%s_%p_%t'(database);
    release channel c1;
    configure controlfile autobackup format for device type disk to 'O:\rman\backup\Auto_Ctrl_weekly_%F';
    allocate channel c1 type disk;
    sql 'alter system archive log current';
    BACKUP tag = Test_Weekly_Arch ARCHIVELOG UNTIL TIME 'SYSDATE-7' format 'O:\rman\backup\Archive_weekly_%d_%s_%p_%t';
    DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    release channel c1;
    After backing up I inserted few records in TEST123 table. And switch current log file.
    Then my database has been corrupted. Now I have last 0 level backup (RMAN) and archive logs files on OS level.
    I am recovering my database with the following commands; but archive logs have not being applied. And my inserted records were not presented in TEST123 table.
    Kindly guide me
    SQL> startup nomount
    CMD> RMAN target=/
    RMAN>set DBID 1168995671
    RMAN>RUN {
    SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
    RESTORE CONTROLFILE from autobackup;
    RMAN> ALTER DATABASE MOUNT;
    RMAN> RESTORE DATABASE CHECK READONLY;
    RMAN> RECOVER DATABASE NOREDO;
    RMAN> restore archivelog all;
    SQL> startup mount
    SQL> alter database backup controlfile to trace;
    SQL> shut immediate
    SQL> startup nomount
    SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG................;
    SQL> alter database open resetlogs
    ---Database altered.
    SQL> select * from TEST123;
    Not record found
    regards;
    Asim

    Dear Khurram;
    Kindly advise where i m worrg???????
    C:\>RMAN target=/
    RMAN> set DBID 1168995671
    executing command: SET DBID
    RMAN> RUN {
    2> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
    3> RESTORE CONTROLFILE from autobackup;
    4> }
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    Starting restore at 27-DEC-07
    using channel ORA_DISK_1
    recovery area destination: O:\rman\backup
    database name (or database unique name) used for search: ORCL
    channel ORA_DISK_1: no autobackups found in the recovery area
    channel ORA_DISK_1: looking for autobackup on day: 20071227
    channel ORA_DISK_1: autobackup found: O:\rman\backup\Auto_Ctrl_weekly_c-11689956
    71-20071227-04
    channel ORA_DISK_1: control file restore from autobackup complete
    output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL
    output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL
    output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL
    Finished restore at 27-DEC-07
    RMAN> ALTER DATABASE MOUNT;
    database mounted
    released channel: ORA_DISK_1
    RMAN> RESTORE DATABASE CHECK READONLY;
    Starting restore at 27-DEC-07
    Starting implicit crosscheck backup at 27-DEC-07
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=155 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=154 devtype=DISK
    Crosschecked 9 objects
    Finished implicit crosscheck backup at 27-DEC-07
    Starting implicit crosscheck copy at 27-DEC-07
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    Finished implicit crosscheck copy at 27-DEC-07
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
    restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
    restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
    restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
    restoring datafile 00005 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST.DBF
    restoring datafile 00006 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST2
    channel ORA_DISK_1: reading from backup piece O:\RMAN\BACKUP\FULL_WEEKLY_ORCL_3_
    1_642420573
    channel ORA_DISK_1: restored backup piece 1
    piece handle=O:\RMAN\BACKUP\FULL_WEEKLY_ORCL_3_1_642420573 tag=Test_WEEKLY_DATAB
    ASE
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
    Finished restore at 27-DEC-07
    RMAN> restore archivelog all;
    archive log thread 1 sequence 1 is already on disk as file O:\ARCHIVE\ARC00001_0642356125.001
    archive log thread 1 sequence 2 is already on disk as file O:\ARCHIVE\ARC00002_0642356125.001
    archive log thread 1 sequence 3 is already on disk as file O:\ARCHIVE\ARC00003_0642356125.001
    archive log thread 1 sequence 4 is already on disk as file O:\ARCHIVE\ARC00004_0642356125.001
    archive log thread 1 sequence 5 is already on disk as file O:\ARCHIVE\ARC00005_0642356125.001
    archive log thread 1 sequence 6 is already on disk as file O:\ARCHIVE\ARC00006_0642356125.001
    archive log thread 1 sequence 7 is already on disk as file O:\ARCHIVE\ARC00007_0642356125.001
    archive log thread 1 sequence 8 is already on disk as file O:\ARCHIVE\ARC00008_0642356125.001
    archive log thread 1 sequence 9 is already on disk as file O:\ARCHIVE\ARC00009_0642356125.001
    archive log thread 1 sequence 10 is already on disk as file O:\ARCHIVE\ARC00010_0642356125.001
    archive log thread 1 sequence 11 is already on disk as file O:\ARCHIVE\ARC00011_0642356125.001
    archive log thread 1 sequence 12 is already on disk as file O:\ARCHIVE\ARC00012_0642356125.001
    channel ORA_DISK_1: starting archive log restore to default destination
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=15
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=16
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=17
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=18
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=19
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=20
    channel ORA_DISK_1: reading from backup piece O:\RMAN\BACKUP\ARCHIVE_WEEKLY_ORCL_5_1_642420630
    channel ORA_DISK_1: restored backup piece 1
    piece handle=O:\RMAN\BACKUP\ARCHIVE_WEEKLY_ORCL_5_1_642420630 tag=Test_WEEKLY_ARCH
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
    Finished restore at 27-DEC-07
    RMAN> ALTER DATABASE OPEN;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 12/27/2007 10:27:10
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    Regards;
    Asim

  • 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

  • Rman - rolling foward with archive logs during recovery

    Database: 9.2.0.6; OS Windows 2003, Rman Backups performed through OEM 10g.
    I have been a long time "write your own scripts" for backups but now I'm learning rman. Purchased the Oracle Database 10g RMAN Backup and Recovery book, but it doesn't have all the answers.
    I have previously recovered a database using my "scripts" and rolled the database forward using archive files, but how is this done with rman? Rman seems to rely on the control file and backup pieces, where the scripts allowed me to just specify "recover database until cancel".
    I have successfully recovered a database. It stopped once it could no longer find the next scn number. I then thought I could copy over the archive logs I have and try it again, try to roll forward, however, during the recover process there were two archive files created which were the next sequence, so I have dupes.
    How do I perform a recover, and apply any archives which were not part of the rman backup?
    The following is what I performed. I copied all my rman backup pieces to a new server. I created a clone of the directory structure,
    oradim -new -sid <dbname>
    orapwd file=<file_name> password=tiger
    set oracle_sid=<dbname>
    rman target /
    startup force nomount
    restore spfile from <file_name>
    shutdown immediate
    startup nomount
    restore controlfile from <file_name>
    restore database
    -- NOTE: It ran and then stopped when it could no longer file the next log sequence
    alter database reset logs;
    The database opened and I can access it, but I really need to roll the logs forward.
    thanks in advance.

    If these are archive logs that RMAN doesn't know about, you'll need to CATALOG these archivelogs before RMAN can use them.

  • 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

  • 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

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

  • Good One - "ORA-00308: cannot open archived log", No Recovery Going On

    Folks,
    Oracle 11gR1 SE cluister in archive log mode. Every hour I scp old logs over to a different server and nuke the ones so archived. I always switch the log destination to a new directory before moving and nuking, so I'm not touching logs being written to. Every once in a while I get;
    Thu Nov 11 22:08:13 2010
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x0] [PC:0x3201E53, _intel_fast_memcmp()+27]
    Errors in file /u01/oracle/diag/rdbms/dekopd78/DEKOPD781/trace/DEKOPD781_ora_30937.trc (incident=805592):
    ORA-07445: exception encountered: core dump [_intel_fast_memcmp()+27] [SIGSEGV] [ADDR:0x0] [PC:0x3201E53] [Address not mapped to object] []
    Incident details in: /u01/oracle/diag/rdbms/dekopd78/DEKOPD781/incident/incdir_805592/DEKOPD781_ora_30937_i805592.trc
    Thu Nov 11 22:09:42 2010
    Errors in file /u01/oracle/diag/rdbms/dekopd78/DEKOPD781/incident/incdir_805592/DEKOPD781_ora_30937_i805592.trc:
    Linux-x86_64 Error: 2: No such file or directory
    Thu Nov 11 22:09:42 2010
    Errors in file /u01/oracle/diag/rdbms/dekopd78/DEKOPD781/incident/incdir_805592/DEKOPD781_ora_30937_i805592.trc:
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log '/u01/oracle/ARCHIVE_LOG_DEST/DEKOPD78/archive2/2_2043_716773164.dbf'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log '/u01/oracle/ARCHIVE_LOG_DEST/DEKOPD78/archive2/2_2044_716773164.dbf'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log '/u01/oracle/ARCHIVE_LOG_DEST/DEKOPD78/archive1/2_2045_716773164.dbf'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log '/u01/oracle/ARCHIVE_LOG_DEST/DEKOPD78/archive1/2_2046_716773164.dbf'
    ORA-27037: unable to obtain file status
    This seems to happen after a core dump (memory leak?). No recovery is going on and the database functions normally afterwards.
    Why would the database try to access old log filles when not recovering?
    Thanks,
    Scott Uhrick
    General Reinsurance

    After some errors database instance tries to access redo data for the last 12 hours: see My Oracle Support note:
    +Oracle Alert Log Is Reporting Archive Log Status Is Not Available For Logs That Have Long Been Backed Up [ID 1161573.1]+
    Edited by: P. Forstmann on 15 nov. 2010 21:34

  • Incremental Backup -- Archive Logs

    When we take incremental backups do we need archive logs?
    Here is the scenario if I delete archive log's and then take a incremental level=1 backup of the database, is my database still recoverable?

    Hi,
    >>If a successful incremental backup was performed AFTER the archive log was deleted, you should be OK. If the archive log was deleted after the incremental backup, you should take another incremental backup.
    if the archivelog was deleted that are generated before starting the backup then u don't need that archivelog after sucessfully completion of backup and if this is generated after the backup then u loss the data.So in that case u should take another backup.
    Thanks
    Kuljeet

Maybe you are looking for

  • HT4061 how can i transfer ringtones from one iphone to another

    How can I transfer ringtones from one Iphone to another

  • How to find infoobject in a transport?

    Is there any transaction to find out specific infoobject /data element included in a transport, like in R3 we have transaction SE03 ? Thank you , Sam

  • 4.3 Error code

    i am trying to upgrade to 4.3 but while it is downloading it stops half way through and says error download could not be complete and i using itunes 10.2 and i have a 4 generation ipod.So i restore it and everytime I restore it all my apps wont sync

  • Fade button label

    Hi, plase help me! I've applied a fade effect to a component that contains a button and some other children. All the component fades correctly and the button fades too, but not its label. I think that it's an embedded fonts problem. So I've embedded

  • Extended  periodic replacement list

    Dear All, I  have a question regarding to ISU DM - Extended  periodic replacement list: Last year, (2010) I created the peridic replacement  list. In 2011, at the customer's request, I changed the certification validity indicator for all devices - in