Recovery datafile

Hi
I changed the datafile offline, and the database is noarchivelog mode.
After a few days I want to bring the datafile online.
Since there will be no transactions to this datafile, during recovery oracle only need to update the checkpoint scn of this datafile
Do I need archivelogs in this scenerio inorder to bring the datafile online?

SQL> select substr(name,1,50) fname,checkpoint_change#,last_change#,status
  2    from v$datafile
  3  /
FNAME                                              CHECKPOINT_CHANGE#     LAST_CHANGE# STATUS
/u01/app/oracle/oradata/mmi/system01.dbf                       970305                SYSTEM
/u01/app/oracle/oradata/mmi/sysaux01.dbf                       970305                ONLINE
/u01/app/oracle/oradata/mmi/undotbs01.dbf                      970305                ONLINE
/u01/app/oracle/oradata/mmi/users01.dbf                        986290                ONLINE
SQL> alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' offline
  2  /
Database altered.
SQL> alter system switch logfile
  2  /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> select substr(name,1,50) fname,checkpoint_change#,last_change#,status
  2    from v$datafile
  3  /
FNAME                                              CHECKPOINT_CHANGE#     LAST_CHANGE# STATUS
/u01/app/oracle/oradata/mmi/system01.dbf                       986389                SYSTEM
/u01/app/oracle/oradata/mmi/sysaux01.dbf                       986389                ONLINE
/u01/app/oracle/oradata/mmi/undotbs01.dbf                      986389                ONLINE
/u01/app/oracle/oradata/mmi/users01.dbf                        986290         986332 RECOVERHere CHECKPOINT_CHANGE# is START SCN 986290 and LAST_CHANGE# is STOP SCN for each datafile header within controlfile,
when you turn offline the datafile the current_scn updated 986332 to that users datafile which will always require
recovery from 986290 to 986332
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:19 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database: MMI (DBID=2169341975)
RMAN> delete archivelog all;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=123 device type=DISK
List of Archived Log Copies for database with db_unique_name MMI
=====================================================================
Key     Thrd Seq     S Low Time
51      1    1       A 16-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_1_700406932.dbf
52      1    1       A 16-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_1_5fqwrsn2_.arc
53      1    2       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_700406932.dbf
54      1    2       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_5frjsk7y_.arc
55      1    3       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_700406932.dbf
56      1    3       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_3_5frjsl62_.arc
57      1    4       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_700406932.dbf
58      1    4       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_4_5frjsmws_.arc
59      1    5       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_5_700406932.dbf
60      1    5       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_5_5frjso5m_.arc
61      1    6       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_6_700406932.dbf
62      1    6       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_6_5frjsos4_.arc
63      1    7       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_7_700406932.dbf
64      1    7       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_7_5frjspqd_.arc
65      1    8       A 19-OCT-09
        Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_8_700406932.dbf
66      1    8       A 19-OCT-09
        Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_8_5frjsqhs_.arc
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_1_700406932.dbf RECID=51 STAMP=700653804
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_1_5fqwrsn2_.arc RECID=52 STAMP=700653804
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_700406932.dbf RECID=53 STAMP=700674306
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_5frjsk7y_.arc RECID=54 STAMP=700674306
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_700406932.dbf RECID=55 STAMP=700674306
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_3_5frjsl62_.arc RECID=56 STAMP=700674306
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_700406932.dbf RECID=57 STAMP=700674307
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_4_5frjsmws_.arc RECID=58 STAMP=700674307
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_5_700406932.dbf RECID=59 STAMP=700674309
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_5_5frjso5m_.arc RECID=60 STAMP=700674309
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_6_700406932.dbf RECID=61 STAMP=700674309
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_6_5frjsos4_.arc RECID=62 STAMP=700674309
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_7_700406932.dbf RECID=63 STAMP=700674310
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_7_5frjspqd_.arc RECID=64 STAMP=700674310
deleted archived log
archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_8_700406932.dbf RECID=65 STAMP=700674311
deleted archived log
archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_8_5frjsqhs_.arc RECID=66 STAMP=700674311
Deleted 16 objects
RMAN> exit
Recovery Manager complete.
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:54 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
RMAN> exit
Recovery Manager complete.
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:54 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' online
  2  /
alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' online
ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '/u01/app/oracle/oradata/mmi/users01.dbf'
SQL> recover datafile 4
ORA-00279: change 986290 generated at 10/19/2009 15:43:28 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_%u_.arc
ORA-00280: change 986290 for thread 1 is in sequence #2
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log
'/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_%u_.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3Look the redo start from change SCN 986290 and will go till stop SCN 986332 as you deleted the archivelog it will ask that redo within those deleted archivelog , if you don't delete then it apply those archivelog , if you don't make a huge activity after the datafile offline mode then still it will require redo till STOP SCN which were updated by current database SCN at the time of making datafile offline regardless it is in either the archivelog file or within online redo log file.
Dont make assumption recovery at transaction level, recovery is the process of applying redo vector delta which is within online redo log file or within archivelog file.Database SCN not wait for the transaction occurring ,its like the wall time clock which increment continuous.Oracle recovery base on that SCN.
Khurram

Similar Messages

  • Error during recover datafile - ORA-01422: exact fetch returns more than ..

    Hi,
    we have got actual a serious problem in our database. Some days ago we created a new datafile for a tablespace in the wrong directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We recognized our mistake and generated the datafile with the same name in teh right directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunaindex/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We set the "wrong" datafile offline in order to rename and replace this in file in the right directory:
    alter database datafile '/oralunadata/anzora8/ANZSIIDX08.dbf' offline;
    ALTER TABLESPACE 'ANZSIIDX'
    RENAME DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf',
    TO '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    After this we wanted to bring the datafile online again with a recovery but
    this fails with teh strange error-message:
    SQL> recover datafile 109;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    A similar thing happens with our RMAN backup from last weekend, which failed:
    channel c4: backup set complete, elapsed time: 00:32:33
    input datafile fno=00109 name=/oralunadata/anzora8/ANZSIIDX08.dbf
    input datafile fno=00103 name=/oralunaindex/anzora8/ITOPROTOKOLLEIDX01.dbf
    input datafile fno=00097 name=/oralunadata/anzora8/ITOPROTOKOLLE03.dbf
    input datafile fno=00096 name=/oralunadata/anzora8/ITOPROTOKOLLE02.dbf
    channel c4: specifying datafile(s) in backupset
    channel c4: starting compressed incremental level 0 datafile backupset
    continuing other job steps, job failed will not be re-run
    ORA-00600: internal error code, arguments: [krbbfmx_notfound], [109], [12801], [], [], [], [], []
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-00604: error occurred at recursive SQL level 1
    Has anybody an idea, how can we bring back the datafile online in order to run succesfull an RMAN backup?
    Actually we see just the workaraound to move the objects from the affected tablespace to new tablespace
    and the drop the empty tablespace what would be quite time consuming and not really practicable for us.
    kind regards,
    Marco

    Hi,
    actual we see this in v$datafile:
    /oralunaindex/anzora8/ANZSIIDX01.dbf     15     ANZSIIDX     10737418240     1310720     AVAILABLE     15     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX02.dbf     46     ANZSIIDX     10737418240     1310720     AVAILABLE     46     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX03.dbf     58     ANZSIIDX     10737418240     1310720     AVAILABLE     58     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX04.dbf     65     ANZSIIDX     10737418240     1310720     AVAILABLE     65     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX05.dbf     78     ANZSIIDX     10737418240     1310720     AVAILABLE     78     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX06.dbf     85     ANZSIIDX     10737418240     1310720     AVAILABLE     85     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX07.dbf     88     ANZSIIDX     10737418240     1310720     AVAILABLE     88     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX09.dbf     109     ANZSIIDX               AVAILABLE     109                                   RECOVER
    /oralunaindex/anzora8/ANZSIIDX08.dbf     110     ANZSIIDX     10737418240     1310720     AVAILABLE     110     NO     0     0     0     10737352704     1310712     ONLINE
    We dont use RMAN-Catalog for backup the information is only stored in the controlfile.
    The recovery datafile command with full path including for the datafile failed with the same error message:
    SQL> connect / as sysdba
    Connected.
    SQL> recover datafile '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    I guess it is a bug of oracle which will sometimes occur when you give two datafiles the same name in different directories that this poduces errors as above in the RMAN inerface(packages)!?
    Maybe we could force to set he tablespace offline, rename the new added datafiles and ry to bring the tablespace online but nobody knows if it works really and we get the tablespace online again?
    Therefore at the moment maybe it's the best way to move the objects away from this tablespace and than drop them, isn't it?
    regards,
    Marco

  • Datafile goes to Offline in Windows reach at 20GB

    Hai All,
    Our Database(Oracle 9i) Working in Windows 2000 Server . Last Thursday around 1:30 our one datafile goes to offline and cannot read or write from this datafile. I see the size =0 and status offline in oracle Enterprise Manager Console.
    The Error Part from Alert Log file is
    SMON: Parallel transaction recovery tried
    Thu Jul 27 13:00:15 2006
    SMON: Parallel transaction recovery tried
    Thu Jul 27 13:20:44 2006
    Errors in file d:\oracle\admin\lourde\udump\lourde_ora_1800.trc:
    ORA-00603: ORACLE server session terminated by fatal error
    ORA-01115: IO error reading block from file 11 (block # 22634)
    ORA-01110: data file 11: 'D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF'
    ORA-27091: skgfqio: unable to queue I/O
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 22633)
    ORA-01115: IO error reading block from file 11 (block # 1819298)
    ORA-01110: data file 11: 'D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF'
    ORA-27091: skgfqio: unable to queue I/O
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 1819297)
    Thu Jul 27 13:20:50 2006
    KCF: write/open error block=0x270ab1 online=1
    file=11 D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF
    error=27069 txt: 'OSD-04026: Invalid parameter passed. (OS 2558641)'
    Automatic datafile offline due to write error on
    file 11: D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF
    Thu Jul 27 13:27:51 2006
    /* OracleOEM */ ALTER DATABASE DATAFILE 'D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF' ONLINE
    Thu Jul 27 13:27:51 2006
    ORA-1113 signalled during: /* OracleOEM */ ALTER DATABASE DATAFILE 'D:\ORACLE...
    Thu Jul 27 13:30:57 2006
    ALTER DATABASE RECOVER DATAFILE 11
    Thu Jul 27 13:30:57 2006
    Media Recovery Datafile: 11
    Media Recovery Start
    Starting datafile 11 recovery in thread 1 sequence 1235
    Datafile 11: 'D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF'
    Media Recovery Log
    Recovery of Online Redo Log: Thread 1 Group 1 Seq 1235 Reading mem 0
    Mem# 0 errs 0: D:\ORACLE\ORADATA\LOURDE\REDO01.LOG
    Errors with log .
    Thu Jul 27 13:31:05 2006
    KCF: write/open error block=0x5871 online=0
    file=11 D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF
    error=27069 txt: 'OSD-04026: Invalid parameter passed. (OS 22641)'
    KCF: write/open error block=0x1bc2a6 online=0
    file=11 D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF
    error=27069 txt: 'OSD-04026: Invalid parameter passed. (OS 1819302)'
    KCF: write/open error block=0x5b1d online=0
    file=11 D:\ORACLE\ORADATA\LOURDE\MEDIWARE.DBF
    The database is in archive log. This specific datafile is in autoextend mode . This error reaches 20th gb of datafile. any limitation of the database file in Windows. In Hard disk lot of space extra at that time. What is the reason of happening this error please help...
    Shiju Kurian

    hi
    ORA-01115: IO error reading block from file 11 (block # 1819298)this error related to datablock corruption....
    in this the error reason is datablock corruption.
    regards
    Mohammadi

  • 실수로 TABLE을 DELETE 또는 DROP한 경우 복구 방법 (time-based recovery)

    제품 : ORACLE SERVER
    작성날짜 : 2004-07-29
    PURPOSE
    사용자의 실수로 중요한 데이타를 delete 하였거나, 테이블을 drop하였을
    경우 복구하는 절차를 정리한 자료이다.
    Explanation
    사용 중인 database 의 archive log mode 여부를 다음과 같이 확인 후
    archive log mode인지 아닌지에 따라 복구 방법이 달라진다.
    os>svrmgrl
    SVRMGR> connect internal;
    SVRMGR> archive log list
    Database log mode ARCHIVELOG
    Automatic archival ENABLED
    Archive destination ?/dbs/arch
    Oldest online log sequence 2525
    Current log sequence 2527
    1. Archive mode인 경우 복구 방법
    archive log mode로 운영중이면서 full backup및 archive file들이 모두
    존재하는 경우 복구가 항상 가능하다.
    이때 다시 다음과 같이 두가지의 경우를 구분하여 복구 작업을 수행할 필요가
    있으며 아래에 각각의 경우에 대한 절차를 자세히 설명한다.
    (1) drop이나 delete한 시점이 얼마 지나지 않았거나, 혹은 필요에 의해
    database 전체를 data 손실 이전 시점으로 돌리고자 하는 경우
    (2) 손실된 data만을 drop이나 delete이전 상태를 받아내고, 나머지 data는
    모두 drop/delete이후 발생한 transaction의 반영분을 유지시키기 위해
    현재 시점으로 맞추어햐 하는 경우
    1-1 database 전체를 drop이나 delete 이전시점으로 돌리고자 할 때
    이러한 경우는 데이타 손실이 발생하기 이전의 datafile들에 대한 backup을
    restore한 후 손실 발생 시점 직전까지 time based로 imcomplete recovery를
    수행하면 된다.
    (1) db를 shutdown시킨 후 현재 상태를 만약의 경우를 대비하여 cold
    backup을 받아둔다.
    shutdown immediate로 db를 내리고, datafiles, redo log files, control
    files 모두 tar등의 명령어를 이용하여 backup을 받아둔다.
    이것은 만약의 경우 이전 backup이나 archive file에 문제가 있는 경우,
    삭제된 data의 복구가 불가능할 경우 현재 상태로라도 돌리기 위한
    것이다.
    (2) 데이타를 삭제하기 이전 상태에서 받아둔 datafile full backup을
    restore한다.
    redo log files과 controlfiles은 현재 것을 그대로 이용하고, 현재
    상태의 모든 datafiles을 지우고 데이타가 삭제되기 전에 받아둔
    backup datafile을 restore시킨다.
    (temp datafile의 경우는 restore시간을 줄이기 위해 restore하지
    않아도된다.)
    (3) restore한 backup시점 이후의 archive file들을 archive log
    destination에 위치시킨다.
    full backup 이후의 archive file들을 일부 tape 장비등에 backup을
    받아두고 지운 상태라면 그러한 file을을 다시 원래 위치에 restore
    하여, full backup받은 시점부터 복구하고자 하는 시점까지의
    archive log file들이 모두 log archive destination에 존재하는지
    확인한다.
    (4) 데이타 삭제 이전 시점까지 time based로 recover를 수행한다.
    이때 날짜와 시간 지정은 항상 아래 예와 같은 형식으로 지정한다.
    만약 데이타를 삭제한 시간이후로 지정하게 되면 recovery후에도
    여전히 data는 지워진 상태로 보여진다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> set autorecovery on
    SVRMGR> recover database until time '2001-01-30:21:00:00';
    SVRMGR> alter database open resetlogs;
    (a) 만약 이때, controlfile이 현재것이 존재하지 않아 datafile뿐
    아니라, controlfile도 과거것을 사용했다면, recovery command를
    다음과 같이 지정하면 된다.
    recover database using backup controlfile (아래줄과 이어짐)
    until time '2001-01-30:21:00:00';
    (b) temp datafile을 restore하지 않은 경우라면 startup mount수행
    직후 다음과 같은 문장을 추가하면 된다.
    alter databse datafile '/oracle/oradata/temp01.dbf'
    offline drop;
    /oracle/oradata/temp01.dbf는 temp datafile의 이름을 예로 든
    것이다.
    (5) 원하는 data가 제대로 조회되는지 확인한다.
    1-2. 삭제된 data만을 복구하고 나머지는 현재 상태를 유지하고자 하는 경우
    이러한 경우는 데이타가 삭제되기 이전 상태의 backup datafile 중에
    SYSTEM, RBS와 삭제된 data가 들어있는 datafile만을 restore시켜 time
    based로 recovery하여 db를 open시킨 후 원하는 table만 export를 받아낸다.
    그리고 다시 현재 상태의 db에 export받은 내용을 import시키는 것이다.
    이때 삭제된 data를 export받기까지의 절차에 대해서 다음과 같이 세가지
    경우의 방법을 생각할 수 있다.
    (a) 다른 시스템에 backup이나 test용으로 oracle이 설치되어 있는 경우
    그 시스템에 backup을 restore하여 해당 table을 export 받는 방법
    (b) 같은 시스템에 backup을 restore 하되, db name과 oracle_sid를 다른
    이름으로 변경하여 다른 db를 만들어 recovery후 open하여 export받는
    방법 <Bulletin:11616 참조>
    (c) 현재 db는 cold backup받아 두고, backup을 restore하여 export을
    받아내는 방법
    여기에서 (a)의 경우는 다른 시스템에 이용하고자 하는 datafile의 oracle
    version 이상의 oracle software가 이미 설치되어 있어야 한다.
    (b)의 경우는 현재 상태의 cold backup을 받았다가 export받은 후 다시
    현재 상태를 restore할 필요는 없애주지만, 대신 SYSTEM, RBS, user
    datafile 만큼의 disk space가 추가로 필요하며, 새로운 db를 추가로
    구성하는 것이므로 init.ora file 구성 등의 작업이 필요하다.
    이것에 관한 자세한 절차는 <Bulletin:11616>을 참조하도록 한다.
    이 자료에서는 이중 (c)에 대한 것만을 자세히 설명한다.
    (1) 현재의 모든 datafiles과 redo log files, datafiles을 다음과 같이
    신중히 cold backup을 받아두도록 한다.
    이것은 이후에 삭제한 data를 복구하여 export를 받은 후에 다시 현재
    상태의 db로 되돌아오기 위한 것이다.
    단 이 때 tar 등을 이용하여 cold backup하는 대신에 disk 상에 cold
    backup을 받아 시간을 절약할 수 있다. disk로의 backup이 가능한
    이유는 export를 위한 time based recovery를 수행하기 위해 필요한
    datafile이 SYSTEM, RBS, 삭제된 data를 포함한 user datafile
    정도이기 때문이다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> shutdown immediate;
    SVRMGR> exit
    os>cp /oracle/oradata/*.ctl /oracle/backup/*.ctl
    os>cp /oracle/oradata/redo*.log /oracle/backup/redo*.log
    os>mv /oracle/oradata/system01.dbf /oracle/backup/system01.bak
    os>mv /oracle/oradata/rbs01.dbf     /oracle/backup/rbs01.bak
    os>mv /oracle/oradata/tools01.dbf /oracle/backup/tools01.bak
    redo log file이나 controlfile의 경우는 time based recovery시에도
    필요하므로 cp를 받아두고, datafile의 경우는 mv를 이용하도록 한다.
    위의 예에 제시된 file이름들은 해당 환경에 맞게 변경되어야 하며,
    tar를 이용하여 tape에 옮겨도 관계는 없으나, 단 cold backup에
    해당하는 모든 datafiles, redo log files, control files를 받아두어야
    한다.
    (2) 삭제한 data가 존재할 당시에 받아둔 backup에서 SYSTEM datafile, RBS
    datafile, 그리고 삭제한 table이 들어있는 datafile만을 restore한다.
    redo log files과 controlfiles은 현재 것을 그대로 이용한다.
    (3) restore한 backup시점 이후의 archive file들을 archive log
    destination에 위치시킨다.
    full backup 이후의 archive file들을 일부 tape 장비 등에 backup을
    받아두고 지운 상태라면 그러한 file을을 다시 원래 위치에 restore
    하여, full backup받은 시점부터 복구하고자 하는 시점까지의
    archive log file들이 모두 log archive destination에 존재하는지
    확인한다.
    (4) restore하지 않을 datafile, 즉 SYSTEM, RBS, 삭제된 data를 포함하
    는 user datafile을 제외한 모든 datafile은 모두 offline drop시키
    고, 데이타 삭제 이전 시점까지 time based로 recover를 수행한다.
    이때 날짜와 시간 지정은 항상 아래 예와 같은 형식으로 지정한다.
    만약 데이타를 삭제한 시간이후로 지정하게 되면 recovery후에도
    여전히 data는 지워진 상태로 보여진다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> alter database datafile '/oracle/oradata/temp01.dbf'
    offline drop; (윗줄과 이어짐)
    SVRMGR> alter database datafile '/oracle/oradata/userdata05.dbf'
    offline drop; (윗줄과 이어짐)
    ... 이와 같이 resotre하지 않은 datafile을 모두 offline drop시킨다.
    SVRMGR> set autorecovery on
    SVRMGR> recover database until time '2001-01-30:21:00:00';
    SVRMGR> alter database open resetlogs;
    만약 이때, controlfile이 현재것이 존재하지 않아 datafile뿐 아니라,
    controlfile도 과거것을 사용했다면, recovery command를 다음과 같이
    지정하면 된다.
    SVRMGR>recover database using backup controlfile until time
    '2001-01-30:21:00:00'; (윗줄과 이어짐)
    (5) 원하는 data가 제대로 조회되는지 확인한 후 필요한 table을 export한다.
    예를 들어 scott user의 dept table을 복구하고자 한것이었다면 다음과
    같이 export를 받는다.
    os>exp scott/tiger file=dept.dmp tables=dept log=deptlog1
    (6) time based로 recovery후 open한 db는 shutdown하여 없애고 (1)번에서
    받아둔 현재 상태의 backup을 restore한다.
    shutdown은 immediate나 abort 모두 가능하며, shutdown후 restore한
    SYSTEM, RBS, user datafile모두 삭제하고, 사용하던 controlfiles,
    redo log files도 모두 삭제한다.
    그리고 (1)에서 mv나 cp로 (혹은 tar로) 옮겨놓은 모든 datafiles,
    controlfiles, redo log files를 원래의 directory와 이름으로
    위치시킨다. SYSTEM, RBS, user datafile도 반드시 (1)번 상태의
    현재 상태 backup을 restore하여야 한다.
    (7) db를 startup시킨 후 (5)에서 받은 export내용을 import시킨다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y
    log=deptlog2 (윗줄과 이어짐)
    (8) 원하는 data가 제대로 조회되는지 확인한다.
    2. No archive mode 로 운영할 경우 복구 방법
    archive mode 로 운영하지 않았을 경우에는, 삭제한 data를 export 받아
    두었거나, 혹은 data가 삭제 전 받아둔 cold backup이 존재하는 경우
    복구가 가능하다.
    (1) export가 존재하는 경우
    다음과 같이 import한다. scott user의 dept가 삭제된 경우를 예로 들었다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y log=log1
    (2) cold backup이 존재하는 경우
    다른 시스템에 사용가능한 oracle engine이 설치되어 있다면, 그곳을
    이용하거나, 혹은 현재 database를 backup받아둔후 현재 시스템에
    restore하여 export를 받아낼 수 있다.
    (1) 현재의 모든 datafiles과 redo log files, datafiles을 다음과 같이
    신중히 cold backup을 받아두도록 한다.
    이것은 이후에 삭제한 data를 복구하여 export를 받은 후에 다시 현재
    상태의 db로 되돌아오기 위한 것이다.
    단 이 때 tar 등을 이용하여 cold backup하는 대신에 disk 상에 cold
    backup을 받아 시간을 절약할 수 있다. disk로의 backup이 가능한
    이유는 export를 위한 time based recovery를 수행하기 위해 필요한
    datafile이 SYSTEM, RBS, 삭제된 data를 포함한 user datafile
    정도이기 때문이다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> shutdown immediate;
    SVRMGR> exit
    os>mv /oracle/oradata/*.ctl /oracle/backup/*.ctl
    os>mv /oracle/oradata/redo*.log /oracle/backup/redo*.log
    os>mv /oracle/oradata/system01.dbf /oracle/backup/system01.bak
    os>mv /oracle/oradata/rbs01.dbf     /oracle/backup/rbs01.bak
    os>mv /oracle/oradata/tools01.dbf /oracle/backup/tools01.bak
    위의 예에 제시된 file이름들은 해당 환경에 맞게 변경되어야 하며,
    tar를 이용하여 tape에 옮겨도 관계는 없으나, 단 cold backup에
    해당하는 모든 datafiles, redo log files, control files를 받아두어야
    한다.
    (2) 삭제한 data가 존재할 당시에 받아둔 backup에서 SYSTEM datafile,
    RBS datafile, 그리고 삭제한 table이 들어있는 datafile만을
    restore한다.
    backup당시의 redo log files과 controlfiles도 restore하여야 한다.
    (3) restore하지 datafile, 즉 SYSTEM, RBS, 삭제된 data를 포함하는 user
    datafile을 제외한 모든 datafile은 모두 offline drop시키고,
    database를 open시킨다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> alter database datafile '/oracle/oradata/temp01.dbf'
    offline drop; (윗줄과 이어짐)
    SVRMGR> alter database datafile '/oracle/oradata/userdata05.dbf'
    offline drop; (윗줄과 이어짐)
    ... 이와 같이 resotre하지 않은 datafile을 모두 offline drop시킨다.
    SVRMGR> alter database open;
    (4) 원하는 data가 제대로 조회되는지 확인한 후 필요한 table을 export
    한다.
    예를 들어 scott user의 dept table을 복구하고자 한 것이었다면
    다음과 같이 export를 받는다.
    os>exp scott/tiger file=dept.dmp tables=dept log=deptlog1
    (5) exprot받아낸 database는 shutdown하여 없애고 (1)번에서 받아둔
    현재 상태의 backup을 restore한다.
    shutdown은 immediate나 abort 모두 가능하며, shutdown후 restore한
    SYSTEM, RBS, user datafile모두 삭제하고, 사용하던 controlfiles,
    redo log files도 모두 삭제한다.
    그리고 (1)에서 mv나 tar로 옮겨놓은 모든 datafiles, controlfiles,
    redo log files를 원래의 directory와 이름으로 위치시킨다.
    (6) db를 startup시킨 후 (4)에서 받은 export내용을 import시킨다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y
    log=deptlog2 (윗줄과 이어짐)
    (7) 원하는 data가 제대로 조회되는지 확인한다.

  • Solaris 9 Oracle 9i (Recover datafile)

    Hi Guys,
    I get these errors
    ora -01157
    ora-01110
    ora-27046
    Thank you.

    ora902@deatdb1->pll01:/u1/admin/pll01/bdump>tail -25 alert_pll01.log
    ALTER DATABASE RECOVER datafile 4
    Fri May 16 10:20:35 2008
    Media Recovery Datafile: 4
    Media Recovery Start
    Fri May 16 10:20:35 2008
    Errors in file /u1/admin/pll01/bdump/pll01_dbw0_14386.trc:
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: '/lldata/oradata/pll01/lldb01.pll01'
    ORA-27046: file size is not a multiple of logical block size
    Additional information: 1
    Media Recovery failed with error 1110
    ORA-283 signalled during: ALTER DATABASE RECOVER datafile 4 ...
    Fri May 16 10:24:35 2008
    ALTER DATABASE RECOVER datafile 4
    Fri May 16 10:24:35 2008
    Media Recovery Datafile: 4
    Media Recovery Start
    Fri May 16 10:24:35 2008
    Errors in file /u1/admin/pll01/bdump/pll01_dbw0_14386.trc:
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: '/lldata/oradata/pll01/lldb01.pll01'
    ORA-27046: file size is not a multiple of logical block size
    Additional information: 1
    Media Recovery failed with error 1110
    ORA-283 signalled during: ALTER DATABASE RECOVER datafile 4 ...
    ora902@deatdb1->pll01:/u1/admin/pll01/bdump>ls -l
    total 836

  • Partial Recovery - Skip UNDO Tablespace

    Hi,
    I was performing a partial database recovery using skip tablespace option using RMAN. I was wondering if I can skip undo tablespace.
    I was not able to conclude whether I can do that? If not, why?
    As per my understanding,
    1. Datafiles are restored - If they have any uncommited data, then archive logs which will be applied for media recovery, will have the undo data to perform those roll backward.
    2. While performing media reccovery using archive logs, it will generate it's own undo data.
    Why do we need the stale undo data (generated till datafiles restoration point)?
    Thanks,
    Janak Agrawal

    Soli,
    Thread that you have specified, talks about datafiles which does not have any uncommitted data (As the database was normally shutdown). In this case, we can drop and recreate the undo tablespace.
    But I am talking about a past point-in-time recovery using RMAN, where the datafiles which will be restored may have the uncommitted data. To rollback these uncommited trnasactions, will we have data in next archivelogs, which will be used for media recovery or the data (needed to rollback) will have only in undo tablespace. Let me give you an example.
    At 9 am I want to restore the datbase till 8.15 AM. Full backup is available till 8 AM and then from 8 to 8:15 arvhive logs are available. While doing recovery, datafiles will be restored till 8 AM. If at 8 AM there is some uncommitted data in datafiles, will it require data from undo tablespace to rollback or first archive log after 8 AM w'd take care of roll back? If archive logs can take care of rollback, why can't I skip the undo tablespace while doing recovery?
    Santosh,
    As you mentioned, UNDO data will require for read-consistency. But the same data will be available in archive logs (which will require after datafiles restore) which can generate their own UNDO data.
    Please clarify. I am sorry if I am missing anything here.
    Thanks,
    Janak Agrawal

  • FUZZY BIT에 대해서 (DATAFILE의 FUZZY 상태)

    제품 : ORACLE SERVER
    작성날짜 : 2000-05-22
    fuzzy bit에 대해서 (datafile의 fuzzy 상태)
    ==========================================
    [1] 개요
    ~~~~~~~~
    datafile이 fuzzy라는 것은 해당 file에 대한 checkpoint이후 그 file에
    변경사항이 있을 수 있음을 나타낸다. 즉 그 file에는 반영되지 않은 변경
    사항이 redo log file과 buffer cache에만 존재하는 경우를 나타낸다.
    이렇게 datafile이 fuzzy 상태인 경우를 setting하여 그러한 상태의
    datafile이 존재하는 경우에는 database가 open되는 것을 막는다.
    [2] datafile status (fuzzy bit)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    datafile의 fuzzy bit라고 하는 것은 실제 별도의 structure로 관리되는 것은
    아니고 datafile header에 datafile의 status를 나타낸다.
    datafile에는 10가지 status가 있으며, 그 중 아래 4개의 status가 datafile이
    fuzzy 임을 나타내며, 각 status를 bit로 나타내면 특정 하나의 bit가 setting
    된 형태이므로 fuzzy bit라고 부른다.
    0x01 (0000 0001) : hot backup-in-progress on file (fuzzy file)
    0x04 (0000 0100) : online fuzzy because it was online and db open
    0x10 (0001 0000) : media recovery fuzzy - file in media recovery
    0x40 (0100 0000) : absolute fuzzy - fuzzyness from fule scan
    [3] clear marker
    ~~~~~~~~~~~~~~~~
    위에서 설명한 fuzzy 상태에 대해서 online fuzzy, hot backup fuzzy, media
    recovery fuzzy, absolute fuzzy라고 부르는데, 앞의 세개에 대해서 fuzzy
    상태가 clear되면 관계되는 marker를 redo log file에 기록한다.
    online fuzzy의 경우는 end crash recovery marker, hot backup fuzzy의
    경우에는 end hot backup marker, media recovery fuzzy에 대해서는 clear
    media recovery fuzzy를 redo log 에 기록하고 datafile header에도 반영한다.
    이렇게 fuzzy 상태가 종료됨을 나타내는 marker를 redo log file에 기록해
    둠으로써, 이후에 redo log file내용을 이용하여 recovery시 datafile의 fuzzy
    상태를 이 marker만을 적용함으로써 clear하도록 할 수 있다.
    [4] 각 fuzzy 종류 설명
    ~~~~~~~~~~~~~~~~~~~~~~
    (1) hot backup fuzzy
    hot backup 시작시에 setting되어 end backup을 만나면 clear된다.
    이것은 hot backup 을 통해 backup 받은 file을 이용하여 recover하는 경우
    end backup이전 상태까지만 recover하는 것을 막기 위한 것이다.
    begin backup end backup recovery 시도
    ---------|-------------------------|-------------------|---------
    1시 5시 10시
    예를 들어 오전 1시에 hot backup을 시작하여 5시에 end backup이 된 경우
    이후에(예를 들어 10시) 이 file을 이용하여 recover하는 경우 time based로
    3시까지만 recover하고자 시도하면 hot backup fuzzy bit가 setting되어
    있어서 오류가 난다.
    즉, 반드시 end backup이 수행된 5시 이후시점까지 recover가 되어야 하는
    것이다. 이것은 hot backup과 end backup 도중 계속해서 그 datafile에
    transaction이 반영되기 때문에 resotre한 file이 이미 3시 이후의 4시,5시
    까지의 변경사항을 일부 포함할 수 있기 때문이다.
    end backup marker는 hot backup시에 end backup 명령이 수행되면 hot backup
    fuzzy bit가 clear되면서 redo log file내에 기록된다. 이후에 이 hot backup된
    datafile을 이용하여 recover하는 경우 그 backup된 datafile의 status는
    hot backup fuzzy bit가 setting된 상태이며, 이 bit는 redo log file
    (혹은 archive file)내에 기록된 end backup marker를 만나면 clear된다.
    (2) online fuzzy
    database가 open되고 datafile이 online상태가 되면 이 bit가 설정된다.
    그리고 database가 정상적으로 shutdown 되거나 recovery시 media recovery가
    성공적으로 끝나면 clear된다. 또한 tablespace를 offline normal하거나
    read only로 변경시키는 명령에 의해 clear된다
    online fuzzy가 필요한 경우를 다음 예를 통해 살펴본다.
    - 1시 : db crash
    - 1시 10분: 사용자가 crash된 datafile을 os image backup
    - 1시 20분: db startup (crash recovery자동 수행으로 정상 open)
    - 2시 : disk failure
    1시 10분에 crash된 채로 받은 backup만이 존재
    archive log mode
    이때 만약 사용자가 1시 10분에 받은 비정상적인 backup을 이용하여 recovery
    를 수행하는 경우를 가정해보자. 이 datafile의 backup은 online fuzzy bit이
    setting상태 그대로이다. 실제 여기에서 datafile은 1시 20분의 crash
    recovery에 의해 online fuzzy가 clear되었기 때문이다.
    이때 만약 recovery시에 until time 으로 1시 15분을 지정한다면 이
    datafile은 여전히 online fuzzy bit가 설정된 상태이기 때문에 database가
    open이 될 수 없다.
    만약 until time을 1시 20분 이후로 지정하게 되면 1시 20분에 생성된
    end-crash recovery marker가 datafile에 적용되어 online fuzzy bit는 clear
    되게 되어 이 부분으로 인해 db가 open되지 않는 일은 없게 된다.
    (3) media recovery fuzzy
    file에 media recovery가 진행중임을 나타낸다. 각 file마다 media recovery가
    시작될 때 설정되었다가, file의 stop SCN을 만나거나 recovery가 정상적으로
    끝나게 되면 clear된다.
    media recovery시 archive file에 기록된 변경사항이 바로 disk에 반영되는 것이
    아니고 일단 archive file의 내용을 buffer 에 읽은 후 반영하는 것이기 때문에,
    변경사항의 일부는 buffer에만 존재할 수 있게 된다. 그래서 media recovery가
    끝날 때까지는 fuzzy상태가 되는 것이다.
    이렇게 recovery fuzzy bit를 설정함으로써, 이미 한 session에서 recovery를
    진행하는 동안 다른 session에서 database를 open하려고 시도하면, recovery
    중임을 알고 open하지 못하도록 하는 것이 가능하다.
    (4) absolute fuzzy
    이 fizzy 상태는 RMAN사용시에만 이용된다. absolute fuzzy SCN은 datafile의
    checkpoint이후 그 datafile의 모든 block들의 모든 SCN중 가장 큰 값이다.
    이 absolute fuzzy flag는 file의 checkpoint로 인해 checkpoint SCN이
    이 absolute fuzzy SCN이상의 값으로 되면 clear된다.

  • ORACLE PARALLEL SERVER (OPS)

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-13
    ORACLE PARALLEL SERVER (OPS)
    ==============================
    PURPOSE
    다음은 OPS(ORACLE PARALLEL SERVER) 의 구조에 대해서 알아본다.
    SCOPE
    Standard Edition 에서는 Real Application Clusters 기능이 10g(10.1.0) 이상 부터 지원이 됩니다.
    Explanation
    1. Parallel Server Architecture
    OPS는 다수의 Loosely Coupled System들 간의 원활한 Resource
    Sharing을 위해 제공하는 DLM(PCM)을 이용하여 동시에 다수의
    사용자가 각 Node를 통해 한 Database를 Access함으로써 System의
    가용성과 전체적인 성능을 극대화시키기 위한 다중처리 System
    구성이다.
    (1) Loosely Coupled System
    SMP Machine과 같이 Tightly Coupled System들 간에 Data Files,
    Print Queue 같은 Resource를 공유하기 위한 Shared Disk
    Architecture로 Node간의 정보전송은 Common High-Speed Bus를
    이용한다.
    (2) Distributed Lock Manager(DLM)
    Loosely Coupled System에서 Resource Sharing을 조정,관리하는
    Software로 Application들이 같은 Resource에 대해 동시에 Access를
    요구할 때 서로간의 Synchronization을 유지하며 Conflict가
    발생하지 않도록 하는 기능을 담당한다.
    다음은 DLM의 주요 Service이다
    - Resource에 대한 Current "ownership" 유지 관리
    - Application Process들의 Resource Request Accept
    - 요구한 Resource가 가용할 경우 해당 Process에 공지
    - Resource에 대한 Exclusive Access 허용
    (3) Parallel Cache Management(PCM)
    Data File내의 하나 이상의 Data Block을 관리하기 위해
    할당되는 Distributed Lock을 PCM Lock이라 하며 어떤 Instance가
    특정 Resource를 Access하기 위해서는 반드시 그 Resource의 Master
    Copy의 "owner"가 되어야 한다.
    이는 곧 그 Resource를 Cover하는 Distributed Lock의 "owner"가
    됨을 의미한다. 이러한 "owner ship"은 다른 Instance가 동일
    Data Block 또는 그 PCM Lock에 의해 Cover되고 있는 다른 Data
    Block에 대한 Update 요구가 있을때까지 계속 유지된다.
    "owner ship"이 한 Instance에 다른 Instance로 전이 되기 전에
    변경된 Data Block은 반드시 Disk로 "write"하므로 각 Node의
    Instance간 Cache Coherency는 철저하게 보장된다.
    2. Parallel Server의 특성
    - Network상의 각 Node에서 Oracle Instance 기동 가능
    - 각 Instance는 SGA + Background Processes로 구성
    - 모든 Instance는 Control File과 Datafile들을 공유
    - 각 Instance는 자신의 Redo Log를 보유
    - Control File, Datafiles, Redo Log Files는 하나 이상의
    Disk에 위치
    - 다수의 사용자가 각 Instance를 통해 Transaction 실행 가능
    - Row Locking Mode 유지
    3. Tuning Focus
    서로 다른 Node를 통해서 하나의 Database 구성하의 Resource를
    동시에 사용하는 OPS 환경에서 Data의 일관성과 연속성을 위한
    Instance간의 Lock Managing은 불가피한 현실이다. 즉, 위에서
    언급한 Instance간의 Resource "owner ship"의 전이(pinging 현상)
    와 같은 Overhead를 최소화하기 위해선 효율적인 Application
    Partition(Job의 분산)이 가장 중요한 현실 Factor이다.
    다시 말해 서로 다른 Node를 통한 동일 Resource에의 Cross-Access
    상황을 최소화해야 함을 의미한다.
    다음은 OPS 환경에서 Database Structure 차원의 Tuning Point로서
    PCM Lock 관련 GC(Global Constant) Parameters와 Storage에 적용할
    Options 및 기타 필요한 사항이다.
    (1) Initial Parameters
    OPS 환경에서 PCM Locks를 의해 주는 GC(Global Constant)
    Parameters는 Lock Managing에 절대적인 영향을 미치며 각 Node마다
    반드시 동일한 Value로 설정(gc_lck_procs 제외)되어야 한다.
    일반적인 UNIX System에서 GC Parameters로 정의하는 PCM Locks의
    총합은 System에서 제공하는 DLM Configuration 중 "Number of
    Resources"의 범위 내에서 설정 가능하다.
    - gc_db_locks
    PCM Locks(DistributedLocks)의 총합을 정의하는 Parameter로
    gc_file_to_locks Parameter에 정의한 Locks의 합보다 반드시
    커야 한다.
    너무 작게 설정될 경우 하나의 PCM Lock이 관리하는 Data Blocks가
    상대적으로 많아지므로 Pinging(False Pinging) 현상의 발생
    가능성도 그만큼 커지게 되며 그에 따른 Overhead로 인해 System
    Performance도 현격히 저하될 가능성이 크다. 따라서 가능한
    최대의 값으로 설정해야 한다.
    - False Pinging
    하나의 PCM Lock이 다수의 Data Blocks를 관리하므로 자신의
    Block이 아닌 같은 PCM 관할하의 다른 Block의 영향으로 인해
    Pining현상이 발생할 수 있는 데 이를 "False Pinging"이라 한다.
    Database Object별 발생한 Pinging Count는 다음과 같이 확인할 수
    있으며 sum(xnc) > 5(V$PING) 인 경우에 더욱 유의해야 한다.
    - gc_file_to_locks
    결국 gc_db_locks에 정의된 전체 PCM Locks는 각 Datafile 당
    적절히 안배가 되는데 전체 Locks를 운용자의 분석 결과에 의거
    각 Datafile에 적절히 할당하기 위한 Parameter이다.
    운용자의 분석 내용은 각 Datafile 내에 존재하는 Objects의 성격,
    Transaction Type, Access 빈도 등의 세부 사항을 포함하되 전체
    PCM Locks 대비 Data Blocks의 적절하고도 효율적인 안배가
    절대적이다.
    이 Parameter로 각 Datafile당 PCM Locks를 안배한 후 Status를
    다음의 Fixed Table로 확인할 수 있다.
    Sample : gc_db_locks = 1000
    gc_file_to_locks = "1=500:5=200"
    X$KCLFI ----> 정의된 Bucket 확인
    Fileno      Bucket     
    1     1     
    2      0      
    3     0     
    4      0     
    5     2     
    X$KCLFH ----> Bucket별 할당된 Locks 확인
    Bucket     Locks     Grouping     Start     
    0     300     1     0     
    1     500     1     300     
    2     200     1     800     
    gc_files_to_locks에 정의한 각 Datafile당 PCM Locks의 총합은 물론
    gc_db_locks의 범위를 초과할 수 없다.
    다음은 각 Datafile에 할당된 Data Blocks의 수를 알아보는 문장이다.
    select e.file_id id,f.file_name name,sum(e.blocks) allocated,
    f.blocks "file size"
    from dba_extents e,dba_data_files f
    where e.file_id = f.file_id
    group by e.file_id,f.file_name,f.blocks
    order by e.file_id;
    - gc_rollback_segments
    OPS로 구성된 각 Node의 Instance에 만들어진 Rollback Segment
    (Init.ora의 rollback_segments에 정의한)의 총합을 정의한다.
    다수의 Instance가 Rollback Segment를 공용으로 사용할 수는 있으나
    OPS 환경에서는 그로 인한 Contention Overhead가 엄청나므로 반드시
    Instance당 독자적인 Rollback Segment를 만들어야 하며 Instance간
    동일한 이름의 부여는 불가하다.
    select count(*) from dba_rollback_segs
    where status='ONLINE';
    위의 결과치 이상의 값으로 정해야 한다.
    - gc_rollback_locks
    하나의 Rollback Segment에서 동시에 변경되는 Rollback Segment
    Blocks에 부여하는 Distributed Lock의 수를 정의한다.
    Total# of RBS Locks = gc_rollback_locks * (gc_rollback_segments+1)
    위에서 "1"을 더한 것은 System Rollback Segment를 고려한 것이다.
    전체 Rollback Segment Blocks 대비 적절한 Locks를 정의해야 한다.
    다음은 Rollback Segment에 할당된 Blocks의 수를 알아보는 문장이다.
    select s.segment_name name,sum(r.blocks) blocks
    from dba_segments s,dba_extents r
    where s.segment_name = r.segment_name
    and s.segment_type = 'ROLLBACK'
    group by s.segment_name;
    - gc_save_rollback_locks
    특정 시점에서 어떤 Tablespace 내의 Object를 Access하고 있는
    Transaction이 있어도 그 Tablespace를 Offline하는 것은 가능하다.
    Offline 이후에 발생된 Undo는 System Tablespace내의 "Differred
    Rollback Segment"에 기록, 보관 됨으로써 Read Consistency를
    유지한다. 이 때 생성되는 Differred Rollback Segment에 할당하는
    Locks를 정의하는 Parameter이다.
    일반적으로 gc_rollback_locks의 값과 같은 정도로 정의하면 된다.
    - gc_segments
    모든 Segment Header Blocks를 Cover하는 Locks를 정의한다. 이 값이
    작을 경우에도 Pinging 발생 가능성은 그 만큼 커지므로 해당
    Database에 정의된 Segments 이상으로 설정해야 한다.
    select count(*) from dba_segments
    where segment_type in ('INDEX','TABLE','CLUSTER');
    - gc_tablespaces
    OPS 환경에서 동시에 Offline에서 Online으로 또는 Online에서
    Offline으로 전환 가능한 Tablespace의 최대값을 정의하는 것으로
    안전하게 설정하기 위해서 Database에 정의된 Tablespace의 수만큼
    설정한다.
    select count(*) from dba_tablespaces;
    - gc_lck_procs
    Background Lock Process의 수를 정하는 것으로 최대 10개까지
    설정(LCK0-LCK9)할 수 있다. 기본적으로 하나가 설정되지만 필요에
    따라 수를 늘려야 한다.
    (2) Storage Options
    - Free Lists
    Free List는 사용 가능한 Free Blocks에 대한 List를 의미한다.
    Database에서 새롭게 가용한 Space를 필요로 하는 Insert나
    Update시엔 반드시 Free Space List와 관련 정보를 가지고 있는
    Blocks Common Pool을 검색한 후 필요한 만큼의 충분한 Blocks가
    확보되지 않으면 Oracle은 새로운 Extent를 할당하게 된다.
    특정 Object에 동시에 다수의 Transaction이 발생한 경우 다수의
    Free Lists는 그만큼 Free Space에 대한 Contention을 감소시킨다.
    결국 Free List의 개수는 Object의 성격과 Access Type에 따라
    적절히 늘림으로써 커다란 효과를 거둘 수 있다.
    예를 들면 Insert나 크기가 늘어나는 Update가 빈번한 Object인
    경우엔 Access 빈도에 따라 3 - 5 정도로 늘려줘야 한다.
    - freelist groups
    Freelist group의 수를 정의하며 전형적으로 OPS 환경에서
    Instance의 수만큼 설정한다. 특정 Object의 Extent를 특정
    Instance에 할당하여 그 Instance에 대한 Freelist Groups를
    유지하므로 Instance별 Free List 관리도 가능하다.
    (3) 기타
    - Initrans
    동시에 Data Block을 Access할 때 필요한 Transaction Entries에
    대한 초기치를 의미하며 Entry당 23Byte의 Space를 미리 할당한다.
    기본값은 Table이 "1" 이고 Index와 Cluster는 "2" 이다. Access가
    아주 빈번한 Object인 경우 Concurrent Transactions를 고려하여
    적절히 설정한다.
    4. Application Partition
    OPS Application Design의 가장 중요한 부분으로 Partitioning의
    기본 원리는 다음과 같다.
    . Read Intensive Data는 Write Intensive Data로부터 다른
    Tablespaces로 분리한다.
    . 가능한 한 하나의 Application은 한 Node에서만 실행되도록
    한다. 이는 곧 다른 Application들에 의해 Access되는 Data에
    대한 Partition을 의미한다.
    . 각 Node마다 Temporary Tablespaces를 할당한다.
    . 각 Node마다 Rollback Segments를 독립적으로 유지한다.
    5. Backup & Recovery
    일반적으로 OPS 환경의 Sites는 대부분 24 * 365 Online 상황이므로
    전체적인 Database 운영은 Archive Log Mode & Hot Backup으로 갈
    수에 없으며 Failure 발생시 얼마나 빠른 시간 안에 Database를
    완벽하게 복구 할 수 있는 지가 최대 관건이라 하겠다.
    모든 Backup & Recovery에 관한 일반적인 내용은 Exclusive Mode
    Database 운영 환경에서와 동일하다.
    (1) Backup
    - Hot Backup Internal
    Archive Mode로 DB를 정상적으로 운영하며 Online Data Files를
    Backup하는 방법으로 Tablespace 단위로 행해진다.
    alter tablespace - begin backup이 실행되면 해당 Tablespace를
    구성하는 Datafiles에 Checkpoint가 발생되어 Memory상의 Dirty
    Buffers를 해당 Datafiles(Disk)에 "Write"함과 동시에 Hot Backup
    Mode에 있는 모든 Datafiles의 Header에 Checkpoint SCN을 Update
    하는데 이는 Recovery시에 중요한 Point가 된다.
    또한 alter tablespace - end backup이 실행되기 전까지 즉,
    Hot Backup이 행해지는 동안 해당 Datafiles는 "fuzzy" Backup
    Data가 생성되며 특정 Record의 변형 시에도 해당 Block이 Redo
    Log에 기록 되므로 다수의 Archive File이 더 생성되는 것을 볼 수
    있다. 따라서 Admin이 해당 Datafiles를 모두 Backup하고도 end
    backup을 실행하지 않으면 전체 인 System 성능에 심각한 영향을
    미치게 되므로 특히 주의해야 한다.
    Hot Backup 중인지의 여부는 다음 문장을 통해 확인할 수 있다.
    select * from v$backup; -> status 확인
    - Hot Backup Step (Recommended)
    ① alter system archive log current
    ② alter tablespace tablespacename begin backup
    ③ backup the datafiles,control files,redo log files
    ④ alter tablespace tablespacename end backup
    ⑤ alter database backup controlfile to 'filespec'
    ⑥ alter database backup controlfile to trace noresetlogs(safety)
    ⑦ alter system archive log current
    (2) Recovery
    - Instance Failure시
    OPS 환경에서 한 Instance의 Failure시 다른 Instance의 SMON이
    즉시 감지하여 Failed Instance에 대한 Recovery를 자동으로
    수행한다. 이 때 운영중인 Instance는 Failed Instance가 생성한
    Redo Log Entries와 Rollback Images를 이용하여 Recovery한다.
    Multi-Node Failure시엔 바로 다음에 Open 된 Instance가 그 역할을
    담당하게 된다. 아울러 Failed Instance가 Access하던 모든 Online
    Datafiles에 대한 Recovery도 병행되는 데 이런 과정의 일부로
    Datafiles에 관한 Verification이 실패하여 Instance Recovery가 되지
    않을 경우엔 다음 SQL Statement를 실행시키면 된다.
    alter system check datafiles global;
    - Media Failure시
    다양한 형태로 발생하는 Media Failure시엔 Backup Copy를
    Restore한 후 Complete 또는 Incomplete Media Recovery를 행해야
    하며 이는 Exclusive Mode로 Database를 운영할 때와 전혀 다르지
    않다.
    Node별 생성된 즉, Thread마다 생성된 모든 Archived Log Files는
    당연히 필요하며 많은 OPS Node 중 어디에서든지 Recovery 작업을
    수행할 수 있다.
    - Parallel Recovery
    Instance 또는 Media Failure시 ORACLE 7.1 이상에서는 Instance
    Level(init.ora) 또는 Command Level(Recover--)에서 Parallel
    Recovery가 가능하다. 여러 개의 Recovery Processes를 이용하여
    Redo Log Files를 동시에 읽어 해당 After Image를 Datafiles에
    반영시킬 수 있다. Recovery_Parallelism Parameter는 Concurrent
    Recovery Processes의 수를 정하며 Parallel_Max_Servers Parameter의
    값을 초과할 수는 없다.
    (3) 운영 시 발생 가능한 Error
    - ORA-1187 발생
    ORA-1187 : can not read from file name because it
    failed verification tests.
    (상황) 하나의 Node에서 create tablespace ... 한 상태에
    정상적으로 운영하던 중 다른 Node를 통해 특정 Object를
    Access하는데 ORA-1187 발생.
    (원인) 다른 Node에서 raw disk의 owner, group, mode 등을
    Tablespace가 생성된 후 뒤늦게 전환.
    (Admin의 Fault)
    (조치) SQL> alter system check datafiles global;
    Reference Documents
    --------------------

    hal lavender wrote:
    Hi,
    I am trying to achieve Load Balancing & Failover of Database requests to two of the nodes in 8i OPS.
    Both the nodes are located in the same data center.
    Here comes the config of one of the connection pools.
    <JDBCConnectionPool CapacityIncrement="5" ConnLeakProfilingEnabled="true"
    DriverName="oracle.jdbc.driver.OracleDriver" InactiveConnectionTimeoutSeconds="0"
    InitialCapacity="10" MaxCapacity="25" Name="db1Connection598011" PasswordEncrypted="{3DES}ARaEjYZ58HfKOKk41unCdQ=="
    Properties="user=ts2user" Targets="ngusCluster12,ngusCluster34" TestConnectionsOnCreate="false"
    TestConnectionsOnRelease="false" TestConnectionsOnReserve="true" TestFrequencySeconds="0"
    TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@192.22.11.160:1421:dbinst01" />
    <JDBCConnectionPool CapacityIncrement="5" ConnLeakProfilingEnabled="true"
    DriverName="oracle.jdbc.driver.OracleDriver" InactiveConnectionTimeoutSeconds="0"
    InitialCapacity="10" MaxCapacity="25" Name="db2Connection598011" PasswordEncrypted="{3DES}ARaEjYZ58HfKOKk41unCdQ=="
    Properties="user=ts2user" Targets="ngusCluster12,ngusCluster34" TestConnectionsOnCreate="false"
    TestConnectionsOnRelease="false" TestConnectionsOnReserve="true" TestFrequencySeconds="0"
    TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@192.22.11.161:1421:dbinst01" />
    <JDBCMultiPool AlgorithmType="Load-Balancing" Name="pooledConnection598011"
    PoolList="db1Connection598011,db2Connection598011" Targets="ngusCluster12,ngusCluster34" />
    Please let me know , if you need further information
    HalHi Hal. All that seems fine, as it should be. Tell me how you
    enact a failure so that you'd expect one pool to still be good
    when the other is bad.
    thanks,
    Joe

  • ORA-00376,ORA-01110 의 조치 방법

    제품 : ORACLE SERVER
    작성날짜 : 2003-01-15
    ORA-00376,ORA-01110 의 조치 방법
    ================================
    Purpose
    ORA-00376: file 29 cannot be read at this time
    ORA-01110: data file 29: '/db/GICORP_4/axix01.dbf'
    Problem Description
    datafile의 size가 os에서 허용하는 filesize를 초과해서
    발생하는 에러입니다.
    Solution Description:
    unix의 ulimit filesize를 확인해 보시기 바랍니다.
    그리고 datafile size 보다 크도록 수정해 주어야 합니다.
    1. unix ulimit filesize를 증가 시킨다
    C shell인 경우
    % limit filesize <number>
    Bourne 이나 Korn shell 인 경우
    $ ulimit -f <number>
    2. archivelog mode인지 확인합니다
    SVRMGR> select * from v$database;
    NAME CREATED LOG_MODE CHECKPOINT ARCHIVE_CH
    GICORP 05/17/00 13:44:56 ARCHIVELOG 36290290 36284249
    1 row selected.
    3. media recovery가 필요한 datafiles를 찾습니다
    SVRMGR> select * from v$recover_file;
    FILE# ONLINE ERROR CHANGE# TIME
    9 OFFLINE 36287415 12/20/00 23:30:55
    23 OFFLINE 36289350 12/21/00 08:40:54
    28 OFFLINE 36287415 12/20/00 23:30:55
    29 OFFLINE 36287415 12/20/00 23:30:55
    37 OFFLINE 36287415 12/20/00 23:30:55
    5 rows selected.
    4. 각각의 datafile에 대해서 다음을 실행해 줍니다
    SVRMGR> recover datafile '/db/GICORP_4/axix01.dbf';
    Media recovery complete.
    SVRMGR> alter database datafile '/db/GICORP_4/axix01.dbf' ONLINE;
    Statement processed.
    5. database를 restart합니다
    SVRMGR> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SVRMGR> startup
    ORACLE instance started.
    Total System Global Area 54578916 bytes
    Fixed Size 69348 bytes
    Variable Size 20783104 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 172032 bytes
    Database mounted.
    Database opened.
    SVRMGR>
    Reference Ducumment
    ---------------------

    Hi,
    You have deleted the data files then how can you expect to query the data :). You need to recover from a valid backup to get the database back. You CAN NOT open database if current undo tablespace data file is gone
    Salman

  • Control file lost and datafile addeed restore/recovery with no data loss

    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
      C1  DATE,
      C2  NUMBER,
      C3  NUMBER,
      C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
      COUNT(*)
         10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered.
    SQL> alter system switch logfile;
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL>  INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> /
    10000 rows created.
    SQL> commit;
    Commit complete.
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 40000)
    ;  2    3    4    5    6    7    8    9   10   11   12   13   14   15
    40000 rows created.
    SQL> commit;
    Commit complete.
    SQL> @datafile
    -- to make sure new datafile has been registered with the DB
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST03.dbf               9 NO
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST02.dbf               8 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    9 rows selected.
    -- now the count and max ... note count before backup was 10000 and max(c1) was diff
    SQL> select count(*) from test.t2;
      COUNT(*)
         70000
    1 row selected.
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:58:25
    1 row selected.
    SQL> -- now restore starts
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@berry trgt]$ rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    RMAN>  connect catalog rman/pass@rcat
    connected to recovery catalog database
    RMAN>  connect target /
    connected to target database (not started)
    RMAN> startup nomount;
    Oracle instance started
    Total System Global Area     188313600 bytes
    Fixed Size                     1335388 bytes
    Variable Size                125833124 bytes
    Database Buffers              58720256 bytes
    Redo Buffers                   2424832 bytes
    RMAN> restore controlfile from autobackup;
    Starting restore at 29-FEB-12 14:02:37
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    recovery area destination: /backup/trgt/flash_recovery_area
    database name (or database unique name) used for search: TRGT
    channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
    channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229
    channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: control file restore from AUTOBACKUP complete
    output file name=/ctrl/trgt/control01.ctl
    output file name=/ctrl/trgt/control02.ctl
    Finished restore at 29-FEB-12 14:02:39
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:02:55
    Starting implicit crosscheck backup at 29-FEB-12 14:02:55
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    Crosschecked 96 objects
    Finished implicit crosscheck backup at 29-FEB-12 14:02:57
    Starting implicit crosscheck copy at 29-FEB-12 14:02:57
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 29-FEB-12 14:02:57
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11
    archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/29/2012 14:02:59
    ORA-01422: exact fetch returns more than requested number of rows
    RMAN-20505: create datafile during recovery
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log'
    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf'
    RMAN> -- wnet to session 2 and renamed datafile from unammed-- wnet to session 2 and renamed datafile for unammed file
    SQL> select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009
    9 rows selected.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf';
    Database altered.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf';
    Database altered.
    SQL>  select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /data3/trgt/CNT_TST02.dbf
    /data3/trgt/CNT_TST03.dbf
    9 rows selected.after above was done, went back to session 1 and tried recovered the DB
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:06:16
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14
    archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15
    media recovery complete, elapsed time: 00:00:00
    Finished recover at 29-FEB-12 14:06:17
    RMAN> alter database open resetlogs;
    database opened
    new incarnation of database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    RMAN> exit
    Recovery Manager complete.
    [oracle@berry trgt]$
    [oracle@berry trgt]$
    [oracle@berry trgt]$ sq
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss:
      2
    SQL>
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss";
    Session altered.
    SQL> select count(*) from test.t2;
    select count(*) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> select max(c1) from test.t2;
    select max(c1) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> alter database datafile 8 online;
    alter database datafile 8 online
    ERROR at line 1:
    ORA-01190: control file or data file 8 is from before the last RESETLOGS
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    {code}
    so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB?
    Edited by: user8363520 on Feb 29, 2012 12:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    user8363520 wrote:
    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
    C1  DATE,
    C2  NUMBER,
    C3  NUMBER,
    C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
    test.T2
    SELECT
    FROM
    (SELECT
    SYSDATE,
    ROWNUM C2,
    DECODE(MOD(ROWNUM,100),99,99,1) C3,
    RPAD('A',300,'A') C4
    FROM
    DUAL
    CONNECT BY
    LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
    COUNT(*)
    10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered. Upto this i was clear, but now i cann't understand when you actually dropped the control file from you database(in running stat) how can you perform "alter system checkpoint" and other "alter tablespace.." command? Once controlfile is inaccessible, oracle database is not suppose to function.

  • Datafiles Mismatch in production & disaster recovery server

    Datafiles Mismatch in production & disaster recovery server though everything in sync
    We performed all the necessary prerequisites & processes related to DRS switchover successfully also our DRS server is constantly updated through logs application in mount state whan we opened DRS database in mount state it opened successfully however when we issued command
    Recover database
    It dumped with foll errors:
    ora-01122 database file 162 failed verification check
    ora-01110 data file 162 </oracle/R3P/sapdata7/r3p*****.data>
    ora-01251 unknown file header version read for file 162
    as I do not remember the exact name now
    However upon comparing the same file at production(which was now in shutdown state) the file sizes were mismatching so we went ahead to copy the datafile from production to DRS in database shutdown state at DRS through RCP utitlity of AIX 5.3 since our Operating system is AIX 5.3
    Though this remote copy was success
    we again started database in mount state & issued command
    Recover database
    But still it dump the same error but now for another datafile in DRS
    I mean I would appreciate if somebody could point out that despite our DRS was constantly being updated through our Production in terms of continuous log application before this activity logs were sync in both the systems also origlos,mirrorlogs & controlfiles were pulled from production system as it is infact the whole structure was as replica of production system , then why did datafile sizes mismatch??
    Details
    SAP version :- 4.7
    WAS :- 620
    Database :- Oracle 9.2
    Operating system :- AIX 5.3

    I am in a process of DR Planning.
    My present setup :
    O/S : HP-UX 11.31
    SAP ECC 6
    Oracle 10g Database.
    I know about dataguard and i have implemnted same on our other application but not for SAP.
    I have ame doubts and I request you to please guide me for the same.
    1. SAP License key -- it required hardware key. So will i have to generate license key another hardware key i.e. for machine where standby database.
    2. Database on standby site will be in manage recovery mode. Will I have to make any changes or any other file realted to SAP on standby host ? (some i know such as I upgrade SAP kernal, same i have to upgrade at standby host)
    Will you give me some link related to document for DR

  • Datafile Incomplete recovery

    Hi,
    I am using oracle database 10g(10.2.0.10) in RHEL5. I want to perform a point in time recovery a datafile from backup. Through RMAN i issued the following command
    RMAN> run{           
    2> sql "alter session set nls_date_format=''dd-mon-yyyy hh24:mi:ss''";
    3> set until time '21-aug-2011 13:04:00';
    4> restore datafile 4;
    5> recover datafile 4;
    6> alter database open resetlogs;}
    But RMAN performed complete recovery. Again i deleted the datafile and restore the datafile from backup. Now i issued the following command in SQL prompt
    SQL> alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
    Session altered.
    SQL>recover datafile '/u01/app/oracle/oradata/ORATESTDB/datafile/o1_mf_users_751h7fmh_.dbf' UNTIL TIME '21-aug-2011 13:04:00';
    ORA-00274: illegal recovery option UNTIL
    It shows the above error. But i am able to perform Incomplete recovery of whole database using the same RMAN command as shown above.
    Does datafile point-in-time recovery is not possible?????? or Is there anything wrong in my approach?????
    Regards,
    007

    A Datafile cannot be recovered to a point in time that is incosistent with the rest of the database.
    (why ? Data Integrity !!!! A table with multiple extents may span multiple datafiles. You cannot have some extents with data as of 12:05 and other extents in another datafile recovered with data as of 10:05 !! Even if it is a single datafile tablespace, you will be violating referential integrity (whether enforced or not) if, say, the SALES table has entries upto 12:05 but the SALES_LINES table has entries upto 10:05 !!)
    You can do a Tablespace Point In Time Recovery using an Auxiliary Instance and then copy the whole tablespace back. You have to ensure that Integrity is maintained.
    Hemant K Chitale

  • Tablespace or datafile  creation during recovery

    Hello
    During recovery,
    If there is new tablespace or datafile added in archivelogs or redologs I have to manually issue:
    alter database create datafile .. as ..
    Why doesnt oracle automatically create the datafiles ?

    The datafile doesn't exist in the control file. The control file maintains the physical structure of the database. During the RECOVERy phase, Oracle reads the ArchiveLogs to identify what updates are to be done -- these are mapped in terms of file, block and row. If the file doesn't exist in the controlfile, the rollforward cannot be applied.
    Therefore, the ALTER DATABASE CREATE DATAFILE ... AS .... allows Oracle to "add' the file to the controlfile and then proceed with the rollforward.
    Oracle doesn't automatically create the datafile because it can't know what the target file name is.
    In your backup your datafiles may have been spread across /u01/oradata/MYDB, /u02/oradata/MYDB, /u03/oradata/MYDB and this file may have been in /u03/oradata/MYDB. However, in your target (restored) location the files may be at only two, differently named, mountpoints : /oradata1/REPDB, /oradata/REPDB. Oracle can't decide for you where the new datafile (which was in /u03/oradata/MYDB) should be created -- should it be in /oradata1/REPDB or /oradata/REPDB or, you might have avaialable /oradata3/REPDB which the database instance isn't aware of !

  • Recovery of lost non-system datafile

    Hello All,
    I have simulated a test environment where I have remove one of the non-sys datafile. For this first I have took the full database backup including archivelog and then remove the datafile from OS level. After that I manually created that datafile in mount state. I put the datafile in offline mode.
    When I'm trying to recover the datafile, Oracle shows me error.
    Please figure me out, where I was wrong.
    Below are steps which I had did.
    SQL> create tablespace TTS datafile '/u01/app/oracle/oradata/test/test.dbf' size 10M;
    RMAN> backup database plus archivelog;
    host $ rm /u01/app/oracle/oradata/test/test.dbf
    sql>startup mount
    sqll> alter database create datafile '/u01/app/oracle/oradata/test/test.dbf';
    sql> alter database datafile '/u01/app/oracle/oradata/test/test.dbf' offline;
    sql> recover datafile  '/u01/app/oracle/oradata/test/test.dbf';
    ORA-00279: change 1080487 generated at 11/06/2012 11:51:50 needed for thread 1
    ORA-00289: suggestion :
    /u01/app/oracle/fast_recovery_area/TEST/archivelog/2012_11_06/o1_mf_1_13_%u_.arc
    ORA-00280: change 1080487 for thread 1 is in sequence #13
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00308: cannot open archived log
    *'/u01/app/oracle/fast_recovery_area/TEST/archivelog/2012_11_06/o1_mf_1_13_%u_.arc'*
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Thanks,
    rohit gupta
    http://dbarohit.blogspot.in/

    Hello John/Azar,
    Thanks!
    I can restore/recover the datafile from database full backup.
    But in my test case, I want to recover the datafile by first creating it manually(that what I have showed).. and then trying to recover it.
    I'm doing this because I have read about this steps.
    John,
    I've already tried to recover that datafile with RMAN, but no luck.
    Below are the error message.
    RMAN> recover datafile 6;
    Starting recover at 06-NOV-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=39 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=38 device type=DISK
    allocated channel: ORA_DISK_3
    channel ORA_DISK_3: SID=40 device type=DISK
    starting media recovery
    archived log for thread 1 with sequence 17 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST/archivelog/2012_11_06/o1_mf_1_17_89kdrhjx_.arc
    archived log for thread 1 with sequence 18 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST/archivelog/2012_11_06/o1_mf_1_18_89kphznq_.arc
    unable to find archived log
    archived log thread=1 sequence=13
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 11/06/2012 15:07:53
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 13 and starting SCN of 1080487
    regards,
    rohit gupta
    http://dbarohit.blogspot.in/

  • Recovery of a lost datafile without backup

    Its the demo for recovery of a lost datafile without backup,but you should have database in archivelog
    in order to make complete recovery,otherwise in noarchivelog mode you may lose some data.Every steps is
    self explainatory so i feel need'nt to add some textual description during demo
    If any findings can be elaborate more please do comments.
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Feb 8 10:35:24 2008
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select name from v$database
      2  /
    NAME
    ORCL
    SQL> create tablespace my_tablespace datafile 'C:\oracle\product\10.1.0\oradata\orcl\my_datafile.dbf' size 500M
      2  /
    Tablespace created.
    SQL> set linesize 1000
    SQL> select * from v$tablespace
      2  /
           TS# NAME                           INC BIG FLA
             0 SYSTEM                         YES NO  YES
             1 UNDOTBS1                       YES NO  YES
             2 SYSAUX                         YES NO  YES
             4 USERS                          YES NO  YES
             3 TEMP                           YES NO  YES
             6 EXAMPLE                        YES NO  YES
             9 MY_TABLESPACE                  YES NO  YES
    7 rows selected.
    SQL> alter user scott default tablespace my_tablespace
      2  /
    User altered.
    SQL> conn scott/tiger@orcl
    Connected.
    SQL> create table my_table as select * from all_objects
      2  /
    Table created.
    SQL> desc my_table
    Name                                                                                                                                                                          
    OWNER                                                                                                                                                                         
    OBJECT_NAME                                                                                                                                                                   
    SUBOBJECT_NAME                                                                                                                                                                
    OBJECT_ID                                                                                                                                                                     
    DATA_OBJECT_ID                                                                                                                                                                
    OBJECT_TYPE                                                                                                                                                                   
    CREATED                                                                                                                                                                       
    LAST_DDL_TIME                                                                                                                                                                 
    TIMESTAMP                                                                                                                                                                     
    STATUS                                                                                                                                                                        
    TEMPORARY                                                                                                                                                                     
    GENERATED                                                                                                                                                                     
    SECONDARY                                                                                                                                                                     
    SQL> conn sys/sys@orcl as sysdba
    Connected.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\>cd C:\oracle\product\10.1.0\oradata\orcl
    C:\oracle\product\10.1.0\oradata\orcl>dir *.dbf
    Volume in drive C has no label.
    Volume Serial Number is F49D-FF2B
    Directory of C:\oracle\product\10.1.0\oradata\orcl
    02/08/2008  10:41 AM       157,294,592 EXAMPLE01.DBF
    02/08/2008  10:41 AM       524,296,192 MY_DATAFILE.DBF
    02/08/2008  10:41 AM       283,123,712 SYSAUX01.DBF
    02/08/2008  10:41 AM       482,353,152 SYSTEM01.DBF
    02/07/2008  11:43 PM       104,865,792 TEMP01.DBF
    02/08/2008  10:41 AM        31,465,472 UNDOTBS01.DBF
    02/08/2008  10:41 AM        56,369,152 USERS01.DBF
                   7 File(s)  1,639,768,064 bytes
                   0 Dir(s)  63,114,174,464 bytes free
    C:\oracle\product\10.1.0\oradata\orcl>del my_datafile.dbf
    C:\oracle\product\10.1.0\oradata\orcl>dir *.dbf
    Volume in drive C has no label.
    Volume Serial Number is F49D-FF2B
    Directory of C:\oracle\product\10.1.0\oradata\orcl
    02/08/2008  10:41 AM       157,294,592 EXAMPLE01.DBF
    02/08/2008  10:41 AM       283,123,712 SYSAUX01.DBF
    02/08/2008  10:41 AM       482,353,152 SYSTEM01.DBF
    02/07/2008  11:43 PM       104,865,792 TEMP01.DBF
    02/08/2008  10:41 AM        31,465,472 UNDOTBS01.DBF
    02/08/2008  10:41 AM        56,369,152 USERS01.DBF
                   6 File(s)  1,115,471,872 bytes
                   0 Dir(s)  63,638,204,416 bytes free
    C:\oracle\product\10.1.0\oradata\orcl>
    SQL> startup
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
    ORA-01110: data file 6: 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\MY_DATAFILE.DBF'
    SQL> select * from v$recover_file
      2  /
         FILE# ONLINE  ONLINE_ ERROR                                                                CHANGE# TIME
             6 ONLINE  ONLINE  FILE NOT FOUND                                                             0
    SQL> alter database create datafile 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\MY_DATAFILE.DBF'
      2  as 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\MY_DATAFILE01.DBF'
      3  /
    Database altered.
    C:\oracle\product\10.1.0\oradata\orcl>dir my_*.dbf
    Volume in drive C has no label.
    Volume Serial Number is F49D-FF2B
    Directory of C:\oracle\product\10.1.0\oradata\orcl
    02/08/2008  10:53 AM       524,296,192 MY_DATAFILE01.DBF
                   1 File(s)    524,296,192 bytes
                   0 Dir(s)  63,110,365,184 bytes free
    C:\oracle\product\10.1.0\oradata\orcl>
    SQL> recover tablespace my_tablespace
    Media recovery complete.
    SQL> alter database open
      2  /
    Database altered.
    SQL> conn scott/tiger@orcl
    Connected.
    SQL> desc my_table
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> Khurram
    http://oraware.blogspot.com/

    When the create tablespace information is in the current control file and database is in archive log mode,
    SQL>recover datafile 6;
    won't help??

Maybe you are looking for

  • Error while attempting to use WebLogic with EDS

    Hello,Previously, I have installed EDS and used the default TomCat (which I would prefer was not automatically installed).Now I want to stop using TomCat and start using WebLogic 8.x . I've gone through the docuemented steps to create the application

  • Imessage internal error on start up/not responding - mac

    Hi, Unfortunately I'm having another problem, this time with the imessage application. When I open the app, the imessage window does not open up. When I double click the application it says "application not responding" I then force quit. One forcing

  • CS3 Can't activate Recorder - additional solution

    Hi all, I was having the standard Windows 7 64bit firewire capture problem outlined here: http://forums.adobe.com/thread/869277. However, having followed those steps, I was still getting the "Can't Activate Recorder. Try Resetting Camera." error when

  • Parent WPF Client Window not on top after closing a screen set

    Hi all, I am observing some strange behavior with the WPF Client (SMP 2.3 SP 4). When closing a screen set (window), sometimes the parent window is in the background (meaning some other windows programs are on top of them) even if the parent window w

  • How to go back to an older version of Quickoffice

    I am writing here as I can't get QuickOffice to respond. I want to go back to an older version and tried to do it with TimeMachine but it must not backup the apps. I have been holding off the update for months with success but when I just updated my