Datafile Status - Recover

Hi All,
My currently configuration is as follows
DB: 11.1.0.6.0
OS: Enterprise Linux 5.2I was away most of last week and only came into the office to be greeted by the error below
ORA-00372: file 318 cannot be modified at this time
SQL> SELECT *
FROM v$recover_file;
  2
     FILE# ONLINE  ONLINE_ ERROR                   CHANGE# TIME
       318 OFFLINE OFFLINE CANNOT OPEN FILE              0
SQL>I dug a little dipper and discovered a datafile was deleted on the 12th.
Fri Mar 12 12:46:28 2010
ALTER DATABASE DATAFILE '/oradata13/zambia/cdrstorage131.dbf' RESIZE 10752M
ORA-3297 signalled during: ALTER DATABASE DATAFILE '/oradata13/zambia/cdrstorage131.dbf' RESIZE 10752M ...
Fri Mar 12 12:47:24 2010
ALTER DATABASE DATAFILE '/oradata13/zambia/cdrstorage147.dbf' RESIZE 10752M
ORA-3297 signalled during: ALTER DATABASE DATAFILE '/oradata13/zambia/cdrstorage147.dbf' RESIZE 10752M ...
Fri Mar 12 12:56:48 2010
ALTER TABLESPACE AGGREGATES ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE
Fri Mar 12 13:00:35 2010
Completed: ALTER TABLESPACE AGGREGATES ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE
Fri Mar 12 13:00:45 2010
Thread 1 advanced to log sequence 573213
  Current log# 5 seq# 573213 mem# 0: /var/zambia/ZAMBIA/onlinelog/redo5_1.log
  Current log# 5 seq# 573213 mem# 1: /oradata01/app/oracle/flash_recovery_area/ZAMBIA/onlinelog/redo5_2.log
Fri Mar 12 13:05:24 2010
ALTER TABLESPACE CDRSTORAGE ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE
ORA-1537 signalled during: ALTER TABLESPACE CDRSTORAGE ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE ...
Fri Mar 12 13:08:50 2010
ALTER DATABASE DATAFILE '/oradata04/zambia/cdrstorage148.dbf'  OFFLINE DROP
Completed: ALTER DATABASE DATAFILE '/oradata04/zambia/cdrstorage148.dbf'  OFFLINE DROP
Fri Mar 12 13:09:25 2010
ALTER TABLESPACE CDRSTORAGE ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE
ORA-1537 signalled during: ALTER TABLESPACE CDRSTORAGE ADD DATAFILE  '/oradata04/zambia/cdrstorage148.dbf' SIZE 30720M REUSE ...
Fri Mar 12 13:14:06 2010
ALTER TABLESPACE AGGREGATES DROP DATAFILE '/oradata04/zambia/cdrstorage148.dbf'
ORA-3264 signalled during: ALTER TABLESPACE AGGREGATES DROP DATAFILE '/oradata04/zambia/cdrstorage148.dbf' ...
Fri Mar 12 13:14:43 2010
ALTER DATABASE DATAFILE '/oradata04/zambia/cdrstorage148.dbf'  ONLINE
ORA-1113 signalled during: ALTER DATABASE DATAFILE '/oradata04/zambia/cdrstorage148.dbf'  ONLINE ...
Fri Mar 12 13:15:03 2010
ALTER TABLESPACE AGGREGATES DROP DATAFILE '/oradata04/zambia/cdrstorage148.dbf'
ORA-3264 signalled during: ALTER TABLESPACE AGGREGATES DROP DATAFILE '/oradata04/zambia/cdrstorage148.dbf' ...
Fri Mar 12 13:16:10 2010
Thread 1 advanced to log sequence 573214
  Current log# 6 seq# 573214 mem# 0: /var/zambia/ZAMBIA/onlinelog/redo6_1.logUnfortunately, I do not have a valid backup (we only export base tables on a daily basis).
1. How do I check for objects affected by the missing datafile?
2. Most of the data that sits on the affected TABLESPACE can easily be re-computed, but how do I go
about sorting this issue out?
3. As far as the database is concerned, the datafile needs media recovery; how do I sort this issue out?
Regards,
Phiri

Unfortunately, I do not have a valid backup (we only export base tables on a daily basis).
1. How do I check for objects affected by the missing datafile?
2. Most of the data that sits on the affected TABLESPACE can easily be re-computed, but how do I go
about sorting this issue out?
3. As far as the database is concerned, the datafile needs media recovery; how do I sort this issue out?
Regards,
PhiriHi,
Am not sure you want resolution of which error. Moreover am not sure why on earth anybody would like to resize, if resize is not possible then drop that datafile without migrating the data.
Anyways,
1) You can query dba_segments for tablespaces, dba_extents for datafiles to get the list of objects that are affected by missing datafile
2) What issue you meant.
3) Is your databases in archive mode. And do you have all the archives from the point when you issued the command may be we could recover but all depends
Regards
Anurag

Similar Messages

  • After offline drop datafile, v$datafile.status='RECOVER'

    OS version:
    [oracle@base ~]$ uname -a
    Linux base.no.sohu.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
    DB version:
    SQL> select version from v$instance;
    VERSION
    9.2.0.1.0Here is my steps,
    SQL>alter database datafile '/usr/oradata/bill/soq05.dbf' offline;
    Database altered.
    SQL>alter database datafile '/usr/oradata/bill/soq05.dbf' offline drop;
    Database altered.Cause there is nothing errors generated, I thought the commands executed sucessfully. But it's not.
    SQL> SELECT NAME,STATUS FROM v$datafile WHERE NAME='/usr/oradata/bill/soq05.dbf';
    NAME                                     STATUS
    /usr/oradata/bill/soq05.dbf              RECOVER
    SQL> SELECT FILE#, STATUS, ERROR, RECOVER, TABLESPACE_NAME, NAME 
      2  FROM   V$DATAFILE_HEADER 
      3  WHERE  RECOVER = 'YES'  OR     (RECOVER IS NULL AND ERROR IS NOT NULL);
         FILE# STATUS  ERROR                RECOVER              TABLESPACE_NAME                NAME
            18 OFFLINE                      YES                  SOQ                            /usr/oradata/bill/soq05.dbf
    [oracle@base ~]$ ll /usr/oradata/bill/soq05.dbf
    -rw-r-----  1 oracle oinstall 1073750016 Aug 28 17:39 /usr/oradata/bill/soq05.dbfThe datafile haven't been droped successfully and its status changed to 'RECOVER'. Also, I can't online it now.
    What should I do to make this datafile droped or at least make it online/offline? What I am worry is the database will be failed to restart because of this 'RECOVER' datafile.
    Thanks very much!
    Satine

    Hey Werner,
    Thanks very much for your help.
    The reason I tried to drop the datafile is after I add the datafile to tablespace, I found the datafile failed to be created on the standby side because the parameter "db_file_name_convert"'s value were incorrect. When I created the datafile on primary side, the value of "db_file_name_convert" was,
    SQL> select name,value from v$parameter where name='db_file_name_convert';
    NAME                           VALUE
    db_file_name_convert           /home/oracle/bill/oradata/bill, /U02/bill/oradata/billIt should be VALUE='/usr/oradata/bill','/U02/bill/oradata/bill'. For now the datafile's status on standby side is,
    SQL> SELECT name,status FROM V$DATAFILE where file#=18;
    NAME                                               STATUS
    /U02/bill/product/9.2.0.1/dbs/UNNAMED00018         RECOVERIf the datafile on primary side could been recovered successfully, is there a way to make the datafile on standby side also correct?
    Thanks
    Satine

  • How to fix a missing datafile with status recover

    Dear all,
    We have Oracle 10 database. And we create a datafile by mistake, and also by mistake we drop the datafile.
    Now the condition is, the datafile is missing but still mentioned in control file, and produce an error every time we do a backup since there's a file missing.
    If we select from $vdatafile, the datafile status is recover.
    We tried to offline the datafile, but its no help.
    How to fix this?
    Thanks.

    Sorry to bump this thread again,
    I tried to get the same error in a Oracle sandbox server.
    I deleted a datafile, so i got a missing datafile, and then i offlined the datafile.
    Then, i created a backup control file and deleted line that refer to the error datafile, and then run it as a sql script to create a new control file.
    But when a new control file was created, the control file got a missing datafile and offlined it automatically.
    This is the control file backuped to a trace file, please notice datafile DATA00001
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "XE" NORESETLOGS  NOARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100
        MAXINSTANCES 8
        MAXLOGHISTORY 292
    LOGFILE
      GROUP 1 'C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_58SZY41W_.LOG'  SIZE 50M,
      GROUP 2 'C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_2_58SZY59P_.LOG'  SIZE 50M
    -- STANDBY LOGFILE
    DATAFILE
      'C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF',
      'C:\ORACLEXE\ORADATA\XE\UNDO.DBF',
      'C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF',
      'C:\ORACLEXE\ORADATA\XE\USERS.DBF',
      'C:\ORACLEXE\ORADATA\XE\DATA00001',
      'C:\ORACLEXE\ORADATA\XE\DATA00002',
      'C:\ORACLEXE\ORADATA\XE\DATA00003'
    CHARACTER SET AL32UTF8
    -- Take files offline to match current control file.
    ALTER DATABASE DATAFILE 'C:\ORACLEXE\ORADATA\XE\DATA00001' OFFLINE DROP;
    and so on...
    This is the script to recreate
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "XE" NORESETLOGS  NOARCHIVELOG
    DATAFILE
      'C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF',
      'C:\ORACLEXE\ORADATA\XE\UNDO.DBF',
      'C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF',
      'C:\ORACLEXE\ORADATA\XE\USERS.DBF',
      'C:\ORACLEXE\ORADATA\XE\DATA00002',
      'C:\ORACLEXE\ORADATA\XE\DATA00003'
    CHARACTER SET AL32UTF8
    This is the result
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "XE" NORESETLOGS  NOARCHIVELOG
    DATAFILE
      'C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF',
      'C:\ORACLEXE\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\MISSING00005',
      'C:\ORACLEXE\ORADATA\XE\DATA00002',
      'C:\ORACLEXE\ORADATA\XE\DATA00003'
    CHARACTER SET AL32UTF8
    -- Take files offline to match current control file.
    ALTER DATABASE DATAFILE 'C:\ORACLEXE\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\MISSING00005' OFFLINE;
    and so on..
    Edited by: Fendhy Ongko on Sep 11, 2009 12:16 PM

  • DATAFILE SYSAUX ---- STATUS RECOVER

    Database Version : 10.1.0.2.0
    OS System : Window 2003 Server
    SQL> SELECT FILE#, STATUS FROM V$DATAFILE;
    FILE# STATUS
    1 SYSTEM
    2 ONLINE
    3 RECOVER
    4 ONLINE
    5 ONLINE
    The following datafiles are offline immediate:
    D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB02\SYSAUX01.DBF (3)
    What should i do.....for correction....
    reply plz.

    Is it running under archivelog mode????
    check and post the output of.
    SQL>  select * from  v$recovery_log;
    SQL>  select * from  v$recover_file;

  • Exclude datafile from recover

    Hi guys,
    I have the following backup list :
    53 Full 3.24G DISK 00:34:04 06-MAR-07
    BP Key: 53 Status: AVAILABLE Compressed: YES Tag: DB_LEVEL0_WHOLE
    Piece Name: /oradata/ware/RMAN/backupset/WARE_3027978988_level0_82_1_2iibu4r3.bkp
    List of Datafiles in backup set 53
    File LV Type Ckp SCN Ckp Time Name
    1 Full 7731515036589 06-MAR-07 /oradata/ware/data/system01.dbf
    2 Full 7731515036589 06-MAR-07 /oradata/ware/undo/undotbs01.dbf
    3 Full 7731515036589 06-MAR-07 /oradata/ware/data/sysaux01.dbf
    4 Full 7731515036589 06-MAR-07 /oradata/ware/data/users01.dbf
    5 Full 7731515036589 06-MAR-07 /oradata/ware/data/SMWH01.dbf
    6 Full 7731515036589 06-MAR-07 /oradata/ware/data/SMWH02.dbf
    7 Full 7731515036589 06-MAR-07 /oradata/ware/data/SMWH03.dbf
    8 Full 7731515036589 06-MAR-07 /oradata/ware/data/SMWH04.dbf
    9 Full 7731515036589 06-MAR-07 /oradata/ware/data/SMWH05.dbf
    10 Full 7731515036589 06-MAR-07 /oradata/ware/data/RADAT.dbf
    11 Full 7731515036589 06-MAR-07 /oradata/ware/data/RAIDX.dbf
    And I´m testing the recover in another machine.. unfortunately I don´t have enought space to a full recover. So I would like to
    exclude datafiles 10 and 11.
    I already restored datafiles 1 to 9. but when I try to recover database I got this message :
    Starting recover at 07-MAR-07
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 03/07/2007 13:06:00
    RMAN-06094: datafile 10 must be restored
    What should I do to exclude datafile 10 and 11 ?
    Thanks,
    Felipe
    Message was edited by:
    Felipe

    Yes, I´m testing RMAN to be sure I will be able to sucessfully backup and recover it if necessary in the future. I never used Rman before in production environment. so I want to be sure it´s ok.
    thanks,
    Felipe

  • Confused with datafile status in v$datafile and v$recovery_file

    Hi All,
    Am facing great confused problem in prod database, accidently i created datafile so i tried to drop it by using "alter database datafile' ' offline drop"
    But its showing recovery status in v$datafile and offline status in v$recovery_file.
    Please inform how to resolve this issue.
    Regards,
    Yasser.(Oracle DBA)

    You add datafiles to a Tablespace and when you remove a datafile from the database you have to drop the associated tablespace that the file had belonged to.
    Exactly what actions did you take in what order to create and eliminate this datafile to and from the database?
    What is the Oracle version?
    What are the results of the following queries?
    select ts#, file#, rfile#, status, enabled from v$datafile
    where name = 'x'
    select "ONLINE", online_status, error
    from v$recover_file where file# = n
    HTH -- Mark D Powell --

  • Recovery of datafile which is in RECOVER state in NOARCHIVELOG mode

    Hi,
    i have following datafile in recover state
    12 /oradata/ORADATA/undo_tbs.dbf OFFLINE
    I tried to recover but getting following errors....
    SQL> recover datafile 12;
    ORA-00279: change 29659636 generated at 03/26/2011 00:47:23 needed for thread 1
    ORA-00289: suggestion : /u01/app/oracle/product/10.2.0/flash_recovery_area/ORCL/archivelog/2011_04_07/o1_mf_1_4608_%u_.arc
    ORA-00280: change 29659636 for thread 1 is in sequence #4608
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log '/u01/app/oracle/product/10.2.0/flash_recovery_area/ORCL/archivelog/2011_04_07/o1_mf_1_4608_%u_.arc'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    due to this datafile we r not able to create tables...is there any solution except restoring from backup...Pl helppp

    SQL> archive log list
    Database log mode No Archive Mode
    Automatic archival Disabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 6150
    Current log sequence 6153
    SQL>
    this is the output
    Edited by: 850520 on Apr 7, 2011 2:46 AM

  • How to diagnose and recover corrupted datafile?

    DBMS: Oracle v.9.2.0.1.0
    OS: MS Server 2003 R2 SP2 x86
    Problem: Database begin to stop every few minutes. I start to check and found that one and the largest of two datafiles is probably corrupted. Now I have no idea how to repair that datafile.
    Firstly, I look into the alert.log and see that^
    Mon Jul 29 11:02:03 2013
    SMON: enabling tx recovery
    Mon Jul 29 11:02:03 2013
    Database Characterset is CL8MSWIN1251
    replication_dependency_tracking turned off (no async multimaster replication found)
    Completed: alter database open
    Mon Jul 29 11:02:42 2013
    KCF: write/open error block=0x3c009f online=1
         file=4 F:\ORACLE\ORADATA\ORCL\USERS_1.ORA
         error=27069 txt: 'OSD-04026: Invalid parameter passed. (OS 3932319)'
    Mon Jul 29 11:02:42 2013
    Errors in file c:\oracle\admin\orcl\bdump\orcl_dbw0_3604.trc:
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01114: IO error writing block to file 4 (block # 3932319)
    ORA-01110: data file 4: 'F:\ORACLE\ORADATA\ORCL\USERS_1.ORA'
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 3932319)
    DBW0: terminating instance due to error 1242
    Instance terminated by DBW0, pid = 3604
    Dump file c:\oracle\admin\orcl\bdump\alert_orcl.log
    So, I turned archivelog on and open database but it continue to stop when somebody calls to some DB objects.
    Then, I check v$headers:
    SQL> select  file#, status, recover, fuzzy, tablespace_name, to_char(CHECKPOINT_CHANGE#), name from v$datafile_header;
      FILE# STATUS  REC FUZ TABLESPACE_NAME      TO_CHAR(CHECKPOINT_CHANGE#)              NAME
             1 ONLINE  NO  YES SYSTEM               9679059694215                            F:\ORACLE\ORADATA\ORCL\SYSTEM.ORA
             2 ONLINE  NO  YES UNDO                 9679059694215                            F:\ORACLE\ORADATA\ORCL\UNDO.ORA
             3 ONLINE  NO  YES USERS                9679059694215                            F:\ORACLE\ORADATA\ORCL\USERS.ORA
             4 OFFLINE YES YES USERS                9679059697551                            F:\ORACLE\ORADATA\ORCL\USERS_1.ORA
    For some reason, USERS in USERS_1.ORA is offline and marked as requiring recovery.
    I tried to recover datafile, but get some errors:
    SQL> recover datafile 'F:\ORACLE\ORADATA\ORCL\USERS_1.ORA';
    ORA-00283: recovery session canceled due to errors
    ORA-01115: IO error reading block from file 4 (block # 3932319)
    ORA-01110: data file 4: 'F:\ORACLE\ORADATA\ORCL\USERS_1.ORA'
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 3932319)
    That have looking creepy for me.
    I tries to verify datafile:
    dbv file=F:\oracle\oradata\orcl\users_1.ora blocksize=16384 logfile=F:\oracle\oradata\orcl\dbvlog.txt
    The result of verification was unexpectedly clean:
    DBVERIFY: Release 9.2.0.1.0 - Production on Tue Jul 30 05:03:26 2013
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    DBVERIFY - Verification starting : FILE = F:\oracle\oradata\orcl\users_1.ora
    DBVERIFY - Verification complete
    Total Pages Examined         : 3932320
    Total Pages Processed (Data) : 94051
    Total Pages Failing   (Data) : 0
    Total Pages Processed (Index): 19378
    Total Pages Failing   (Index): 0
    Total Pages Processed (Other): 3753059
    Total Pages Processed (Seg)  : 0
    Total Pages Failing   (Seg)  : 0
    Total Pages Empty            : 65832
    Total Pages Marked Corrupt   : 0
    Total Pages Influx           : 0
    Now I have that offlined tablespace in the probably not corrupted datafile and no idea how to get DB into the normal state.
    Upd: I did database validation by RMAN:
    RMAN> BACKUP VALIDATE DATABASE;
    Starting backup at 30-JUL-13
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current controlfile in backupset
    input datafile fno=00004 name=F:\ORACLE\ORADATA\ORCL\USERS_1.ORA
    input datafile fno=00002 name=F:\ORACLE\ORADATA\ORCL\UNDO.ORA
    input datafile fno=00003 name=F:\ORACLE\ORADATA\ORCL\USERS.ORA
    input datafile fno=00001 name=F:\ORACLE\ORADATA\ORCL\SYSTEM.ORA
    channel ORA_DISK_1: backup set complete, elapsed time: 00:33:06
    Finished backup at 30-JUL-13
    That would been check my DB and put information of corrupted blocks to a V$DATABASE_BLOCK_CORRUPTION, but no! There's nothing:
    SQL> select * from V$DATABASE_BLOCK_CORRUPTION;
    no rows selected
    Nevertheless, database doesn't open, until I switch bad datafile to offline^
    SQL> alter database datafile 'F:\ORACLE\ORADATA\ORCL\USERS_1.ORA' online;
    Database altered.
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01113: file 4 needs media recovery
    ORA-01110: data file 4: 'F:\ORACLE\ORADATA\ORCL\USERS_1.ORA'
    Message was edited by: Llywelyn.yv

    Does it diferents from below?
    RMAN> BACKUP VALIDATE DATABASE;
    Starting backup at 30-JUL-13
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current controlfile in backupset
    input datafile fno=00004 name=F:\ORACLE\ORADATA\ORCL\USERS_1.ORA
    input datafile fno=00002 name=F:\ORACLE\ORADATA\ORCL\UNDO.ORA
    input datafile fno=00003 name=F:\ORACLE\ORADATA\ORCL\USERS.ORA
    input datafile fno=00001 name=F:\ORACLE\ORADATA\ORCL\SYSTEM.ORA
    channel ORA_DISK_1: backup set complete, elapsed time: 00:33:06
    Finished backup at 30-JUL-13

  • Recovering lost datafile

    My database 10.1 is running in noarchivelog mode and
    and there was no rman backup
    My datafile was lost and I want to restore a copy of the lost file but i have the following error when restarting the database
    ORA-01203:, wrong incarnation of this file - wrong creation SCN
    Any help?
    Regards

    In this case jus copy the datafile back to its original directory
    startup mount
    make the corrup[ted datafile offline
    alter datafile '/.dbf' offline; 
    open the database
    alter database open;
    make the tablespace of the datafile offline
    alter tablespace <tablespacename of the datafile> offline;
    recover the resored datafile
    recover datafile 'filename'
    make the tablespace onlien
    alter tablespace <tablespacename of the datafile> online;
    This will work but
    Let us wait from our experts
    Message was edited by:
            Maran.E
    Message was edited by:
            Maran.E                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Recover datafile doubt

    After did a switchover(DataGuard), on my current primary database I did a level 0 backup RMAN and it did not end due to an error with an datafile that needs recover, specifically the datafile 2 (sysaux tablespace). The last level 0 backup I have is 9 days ago. The first thing I do was restore the datafile and try to recover it.
    RMAN> run{sql 'alter database datafile 2 offline';  restore datafile 2; recover datafile 2;}
    The second step (recover) show me the following error:
    unable to find archived log
    archived log thread=1 sequence=1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 08/17/2010 12:19:01
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1 and starting SCN of 1757
    I appreciate any help, thank you.

    Dear user12100209,
    Please see the error message;
    RMAN-06054: media recovery requesting unknown archived log for thread string with sequence string and starting SCN of string
    Cause: Media recovery is requesting a log whose existence is not recorded in the recovery catalog or target database control file.
    Action: If a copy of the log is available, then add it to the recovery catalog and/or control file via a CATALOG command and then retry the RECOVER command.
    If not, then a point-in-time recovery up to the missing log is the only alternative and database can be opened using ALTER DATABASE OPEN RESETLOGS command.So what i am thinking is that is happening because of a missing archivelog metadata(information) in the standby controlfile.
    Below link may give you a general information;
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV89834
    Hope That Helps.
    Ogan

  • Restore & Recover SYSAUX datafile while DB up

    Hi,
    Due to data block corruption of SYSAUX, need to keep it offline then recover and make it online.
    sql 'alter database datafile 2 offline';
    restore datafile 2;
    recover datafile 2;
    sql 'alter database datafile 2 online';
    Is it possible to do this operation while Database is up? or we need to keep it down?
    BANNER
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Thanks
    Edited by: Nadvi on Jun 10, 2010 10:02 PM
    Edited by: Nadvi on Jun 10, 2010 10:28 PM

    Nadvi wrote:
    Hi,
    Due to data block corruption of SYSAUX, need to keep it offline then recover and make it online.
    sql 'alter database datafile 2 offline';
    restore datafile 2;
    recover datafile 2;
    sql 'alter database datafile 2 online';
    Is it possible to do this operation while Database is up? or we need to keep it down?
    BANNER
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    ThanksDear Nadvi
    Why you don't perform Block Media Recovery on the corrupted data blocks using RMAN?
    In the following example I show how you can recover corrupted data block in the SYSAUX tablespace. However, as you use Oracle 11g, you will use the following syntax:
    RECOVER DATAFILE datafile_no BLOCK block)no Here's the example:
    SQL> create user test identified by test;
    User created.
    SQL> grant dba to test;
    Grant succeeded.
    SQL> conn test/test
    Connected.
    SQL> create table tbl_test (name varchar2(10)) tablespace sysaux;
    Table created.
    SQL> insert into tbl_test values('test');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> SELECT header_block FROM dba_segments WHERE segment_name='TBL_TEST';
    HEADER_BLOCK
            2939
    SQL> select tablespace_name from dba_segments where segment_name='TBL_TEST';
    TABLESPACE_NAME
    SYSAUX
    RMAN> backup database plus archivelog delete input;
    [oracle@localhost ~]$ dd of=/u01/oracle/product/10.2.0/db_1/oradata/db1/sysaux01.dbf bs=8192 conv=notrunc seek=2939 <<EOF
    corruption
    EOF0+1 records in
    0+1 records out
    11 bytes (11 B) copied, 0.0182719 seconds, 0.6 kB/s
    SQL> alter system flush buffer_cache;
    System altered.
    SQL> conn test/test
    Connected.
    SQL> select * from tbl_test;
    select * from tbl_test
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 3, block # 2939)
    ORA-01110: data file 3:
    '/u01/oracle/product/10.2.0/db_1/oradata/db1/sysaux01.dbf'
    RMAN> blockrecover datafile 3 block 2939;
    starting media recovery
    media recovery complete, elapsed time: 00:00:07
    Finished blockrecover at 10-JUN-10
    RMAN> exit
    SQL> conn test/test
    Connected.
    SQL> select * from tbl_test;
    NAME
    testFor more information on Block Media Recovery, you can watch my Video Tutorial
    http://kamranagayev.wordpress.com/2010/03/18/rman-video-tutorial-series-performing-block-media-recovery-with-rman/

  • Creating a new controlfile with datafiles in RMAN backup

    Hi,
    i am using oracle 10g (10.2.0.1) in RHEL5 server. i am trying to restore a RMAN backup from one server to another new server with new db name. i have taken out the spfile from RMAN autobackup and created pfile from it and edited the pfile with new dbname and directory structure and started the db in nomount with the new pfile. Now i have restored the controfile from the RMAN autobackup tried to put the database in mount state. But it failed due to the below error
    RMAN-03002: failure of alter db command at 11/05/2012 21:44:56
    ORA-01103: database name 'ORADB' in control file is not 'DEVDB'
    Hence i shutdown the database and started the db in nomount with new pfile and tried to create the controlfile with the new db name,but it failed as it is looking for the datafiles.
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01565: error in identifying file
    '/u01/app/oracle/oradata/DEVDB/datafile/o1_mf_system_80jq0kfw_.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    All my datafiles reside in my RMAN backup. How to get the datafiles from RMAN backup in the above scenario??
    Regards,
    007

    Hello;
    The location and filename and DBIS will be different, but you need something like this :
    $ORACLE_HOME/bin/rman  << EOF
    CONNECT TARGET /
    STARTUP NOMOUNT;
    SET DBID 3754763357;  #DBID of PROD database
    RUN
       ALLOCATE CHANNEL c1 DEVICE TYPE disk format '/u01/oradata/backups';
       RESTORE CONTROLFILE FROM '/u01/oradata/backups/sb_t790762003_s85_p1';
       ALTER DATABASE MOUNT;
       SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/CLONE/system01.dbf';
        SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle/oradata/CLONE/temp01.dbf';
       RESTORE DATABASE;
       SWITCH DATAFILE ALL;
       RECOVER DATABASE;
       release channel c1;
    ALTER DATABASE OPEN RESETLOGS; So you need "SET NEWNAME" for all your files
    Full Example
    http://www.visi.com/~mseberg/rman/restore_database_without_catalog.html
    Best Regards
    mseberg

  • Delete a datafile in 11gR2 ASM

    Here is the current datafiles of the database 11gR2, 11.2.0.1 on the ASM file system.
    SQL> select FILE_NAME,TABLESPACE_NAME from dba_data_files;
    FILE_NAME TABLESPACE_NAME
    +DATA01/heat/datafile/testtbs.274.807968419             TESTTBS
    +DATA01/heat/datafile/testtbs.266.807968493             TESTTBS
    +DATA01/heat/datafile/testtbs.258.807968511             TESTTBS
    1/ Use RMAN to backup the whole db onto the disk
    2/ In RMAN, check the backup: List backup; See all the backup including the above data files;
    3/ Run this cmd to drop 1 datafile, In SQL> ALTER TABLESPACE TESTTBS drop datafile '+DATA01/heat/datafile/testtbs.258.807968511';
    4/ Verify it, whether that data file deleted, yes it was deleted.
    SQL> select FILE_NAME,TABLESPACE_NAME from dba_data_files;
    FILE_NAME TABLESPACE_NAME
    +DATA01/heat/datafile/testtbs.274.807968419             TESTTBS
    +DATA01/heat/datafile/testtbs.266.807968493             TESTTBS
    5/ In RMAN, check the backup again: List backup; It's not there in the backup. Why's that ?????????????????????
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    6 Full 935.09M DISK 00:01:15 21-FEB-2013 11:43:44
    BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20130221T114228
    Piece Name: +FRA01/heat/backupset/2013_02_21/nnndf0_tag20130221t114228_0.344.807968549
    List of Datafiles in backup set 6
    File LV Type Ckp SCN Ckp Time Name
    1 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/system.256.807898985
    2 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/sysaux.261.807898985
    3 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/undotbs1.260.807898985
    4 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/users.268.807898985
    5 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/testtbs.274.807968419
    6 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/testtbs.266.807968493
    7 Full 999944 21-FEB-2013 11:42:29
    6/ Try restore the deleted data file, it's not available in the backup ????? I do not understand this ? Really appreciate someone could explain this ?????

    When you drop a datafile, the database instance updates controlfiles, redologs and SCN numbers. The datafile you have in your backup will no longer match the the rest of the database environment, so it cannot be restored without restoring the complete database prior to the time the datafile was dropped. Similarly you cannot mount or restore the datafile of a different database. The database does not maintain recovery information for a datafile that does not exist. If you loose the datafile, e.g. delete it from the filesystem, you can restore the datafile and recover the information using the existing controlfile and redologs. That is all normal and is not influenced by ASM.

  • NOARCHIVELOG - lost datafile

    We have a situation here. We lost the datafile associated with UNDOTBS and we are in NOARCHIVELOG mode.
    The option seems to be to use .....OFFLINE DROP and then drop the tablespace.
    Accordingly, dropped the tablespace and attempting to open the database, the database is still looking for the datafile:
    ORA-376 datafile xxxx cannot be read at this time.
    how can I open the database....
    My thought was to drop offline, open and then recreate the tablespace. It appears that I will not be needing any undo segments though.
    Appreciate your help and thoughts.
    BTW, this is DEV - therefore in NOARCHIVELOG mode.

    Hello,
    So, if I well understood you set the following parameters:
    undo_management = AUTO
    undo_tablespace = ''
    And you still have the ORA-376 error.
    So, I think, you may have an offline datafile.
    May you execute the following statement ?
    select status, enabled from v$datafile;You could check if you have an offline datafile or a datafile to RECOVER.
    Hope it can help,
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 18, 2009 11:46 PM

  • Datafile not restored due to missing or corrupt data

    Hi all,
    I was asked to restore a RMAN backup which we got from another region, the rman backup contains controlfiles and datafiles as compressed backupset.
    oracle version is 10.2.0.3.0
    aix version 6
    First, I have restored the control file using the below command:
    run
    +{+
    allocate channel t1 type disk;
    restore controlfile from '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    alter database mount;
    +}+
    Second, I have cataloged the backup piece:
    catalog backuppiece '/oracle/app/prod/rman/df_t794754324_s12_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t793567544_s13_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t731097654_s14_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792538698_s15_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792183472_s16_p1';
    catalog backuppiece '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    Third, used below command to restore:
    +run {+
    allocate channel t1 type disk;
    allocate channel t2 type disk;
    allocate channel t3 type disk;
    allocate channel t4 type disk;
    set newname for datafile 01 to '/oracle/app/oradata/dbprod/system01.dbf';
    set newname for datafile 02 to '/oracle/app/oradata/dbprod/undotbs01.dbf';
    set newname for datafile 03 to '/oracle/app/oradata/dbprod/sysaux01.dbf';
    set newname for datafile 04 to '/oracle/app/oradata/dbprod/users01.dbf';
    set newname for datafile 06 to '/oracle/app/oradata/dbprod/datafile005.dbf';
    set newname for datafile 07 to '/oracle/app/oradata/dbprod/datafile006.dbf';
    set newname for datafile 08 to '/oracle/app/oradata/dbprod/datafile007.dbf';
    set newname for datafile 09 to '/oracle/app/oradata/dbprod/datafile008.dbf';
    set newname for datafile 10 to '/oracle/app/oradata/dbprod/datafile009.dbf';
    set newname for datafile 11 to '/oracle/app/oradata/dbprod/datafile010.dbf';
    set newname for datafile 14 to '/oracle/app/oradata/dbprod/datafile001.dbf';
    set newname for datafile 15 to '/oracle/app/oradata/dbprod/datafile002.dbf';
    set newname for datafile 16 to '/oracle/app/oradata/dbprod/datafile003.dbf';
    set newname for datafile 17 to '/oracle/app/oradata/dbprod/datafile004.dbf';
    set newname for datafile 18 to '/oracle/app/oradata/dbprod/indfile001.dbf';
    set newname for datafile 19 to '/oracle/app/oradata/dbprod/indfile002.dbf';
    set newname for datafile 20 to '/oracle/app/oradata/dbprod/indfile011.dbf';
    restore database;
    switch datafile all;
    recover database;
    +}+
    But while restoring, I got error like below:
    Starting restore at 22-OCT-12
    channel t1: starting datafile backupset restore
    channel t1: specifying datafile(s) to restore from backup set
    restoring datafile 00004 to /glotam3/oracle10g/oradata/T24DEV3/users01.dbf
    restoring datafile 00007 to /glotam3/oracle10g/oradata/T24DEV3/datafile006.dbf
    restoring datafile 00011 to /glotam3/oracle10g/oradata/T24DEV3/datafile010.dbf
    restoring datafile 00012 to /glotam3/oracle10g/oradata/T24DEV3/recop01.dbf
    restoring datafile 00014 to /glotam3/oracle10g/oradata/T24DEV3/datafile001.dbf
    channel t1: reading from backup piece /oracle/app/prod/rman/df_t793567544_s13_p1
    channel t2: starting datafile backupset restore
    channel t2: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to /oracle/app/oradata/dbprod/system01.dbf
    restoring datafile 00003 to /oracle/app/oradata/dbprod/sysaux01.dbf
    restoring datafile 00008 to /oracle/app/oradata/dbprod/datafile007.dbf
    restoring datafile 00015 to /oracle/app/oradata/dbprod/datafile002.dbf
    restoring datafile 00018 to /oracle/app/oradata/dbprod/indfile001.dbf
    channel t2: reading from backup piece /oracle/app/prod/rman/df_t792538698_s15_p1
    channel t3: starting datafile backupset restore
    channel t3: specifying datafile(s) to restore from backup set
    restoring datafile 00002 to /oracle/app/oradata/dbprod/undotbs01.dbf
    restoring datafile 00009 to /oracle/app/oradata/dbprod/datafile008.dbf
    restoring datafile 00013 to /oracle/app/oradata/dbprod/prefstat01.dbf
    restoring datafile 00016 to /oracle/app/oradata/dbprod/datafile003.dbf
    restoring datafile 00019 to /oracle/app/oradata/dbprod/indfile002.dbf
    channel t3: reading from backup piece /oracle/app/prod/rman/df_t731097654_s14_p1
    channel t4: starting datafile backupset restore
    channel t4: specifying datafile(s) to restore from backup set
    restoring datafile 00006 to /oracle/app/oradata/dbprod/datafile005.dbf
    restoring datafile 00010 to /oracle/app/oradata/dbprod/datafile009.dbf
    restoring datafile 00017 to /oracle/app/oradata/dbprod/datafile004.dbf
    restoring datafile 00020 to /oracle/app/oradata/dbprod/indfile011.dbf
    channel t4: reading from backup piece /oracle/app/prod/rman/df_t794754324_s12_p1
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t793567544_s13_p1
    ORA-19612: datafile 11 not restored due to missing or corrupt data
    channel t3: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t731097654_s14_p1 tag=TAG20120822T184703
    channel t3: restore complete, elapsed time: 01:06:05
    channel t2: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t792538698_s15_p1 tag=TAG20120822T184703
    channel t2: restore complete, elapsed time: 01:09:10
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t794754324_s12_p1
    ORA-19612: datafile 20 not restored due to missing or corrupt data
    failover to previous backup
    released channel: t1
    released channel: t2
    released channel: t3
    released channel: t4
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 10/22/2012 15:11:23
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN>
    This same rman backup has been restored in other server, the commands were same but the db was not restored in my server.
    Kindly help me....
    Thanks in advance,
    nonuday

    Hi mseberg,
    When I executed the below command with same date. This is what is got and am not able to understand what it says.
    RMAN> run
    +{+
    SET UNTIL TIME "TO_DATE('10/22/2012','MM/DD/YYYY')";
    restore database preview;
    +}2> 3> 4> 5>+
    executing command: SET until clause
    Starting restore at 23-OCT-12
    using channel ORA_DISK_1
    List of Backup Sets
    +===================+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +8 Full 11.68G DISK 02:10:15 22-AUG-12+
    BP Key: 18   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t793567544_s13_p1
    List of Datafiles in backup set 8
    File LV Type Ckp SCN    Ckp Time  Name
    +4 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/users01.dbf+
    +7 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile006.dbf+
    +11 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile010.dbf+
    +12 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/recop01.dbf+
    +14 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +10 Full 11.35G DISK 02:15:49 22-AUG-12+
    BP Key: 16   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t792538698_s15_p1
    List of Datafiles in backup set 10
    File LV Type Ckp SCN    Ckp Time  Name
    +1 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/system01.dbf+
    +3 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/sysaux01.dbf+
    +8 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile007.dbf+
    +15 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile002.dbf+
    +18 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +11 Full 10.78G DISK 02:20:07 22-AUG-12+
    BP Key: 15   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t731097654_s14_p1
    List of Datafiles in backup set 11
    File LV Type Ckp SCN    Ckp Time  Name
    +2 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/undotbs01.dbf+
    +9 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile008.dbf+
    +13 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/prefstat01.dbf+
    +16 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile003.dbf+
    +19 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile002.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +12 Full 16.83G DISK 03:25:43 22-AUG-12+
    BP Key: 14   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t794754324_s12_p1
    List of Datafiles in backup set 12
    File LV Type Ckp SCN    Ckp Time  Name
    +6 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile005.dbf+
    +10 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile009.dbf+
    +17 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile004.dbf+
    +20 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile011.dbf+
    archive logs generated after SCN 30013719101 not found in repository
    Media recovery start SCN is 30013719101
    Recovery must be done beyond SCN 30013719101 to clear data files fuzziness
    Finished restore at 23-OCT-12
    RMAN>
    Thanks for reply,
    Nonuday

Maybe you are looking for

  • Droid Razr M Red Eye Boot Loop--continues for TOO many customers, need help!

    Droid Razr M problem with red eye boot loop--with ALL of the many posts that can be found online concerning this problem, why is there not a FIX from Motorola and/or Verizon?  All I seem to get are suggestions (I've tried) and "device is now consider

  • Dynamic radio button fields do not display again after form is saved

    Hello, I have a group of radio button questions within a dynamic form that display additional questions based on the answer. So for the question "Is there a basement?" if the user indicates yes, there is a basement, additional questions are displayed

  • HTMLLoader action does not work

    All I want to do is to send e-mails of an image of the page to a list of users . I am developing the BLS to do so .  Therefore,  I am doing a step by step aproach : 1.- Using a HTMLLoader action providing all the parameters (  Source URL , login user

  • Retrieving Blob files

    I have a SQL Server 7 database where files are stored as blob. Now I want to retrieve the files so i created a java program. I can retrieve the files, but when I open them (I saved them as txt) there unreadable. Then I found that in the text the type

  • Corrupt text from iPad export

    So, I've emailed myself the PDF of the Keynote presentation I created on my iPad. I also used iWork.com. I also transferred it via iTunes. The problem: All of them have several pages of corrupt text whether opening in Acrobat or Preview. All I get ar