DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Database Recovery

  1. #11
    Join Date
    Nov 2004
    Location
    Mumbai, India
    Posts
    452
    After testing the scenario in 10g i found that the non existant datafile is not created automatically, but an unnamed datafile is added automatically to the controlfile.(something in the line of C:\ORA10G\DATABASE\UNNAMED00007)
    Contrary to the doc given by sambavan "alter database rename ...." will not work if the datafile in question is non existant (which is natural since you lost it during a server crash and you don't have a backup of it)

    Instead,"Alter database create datafile "C:\ORA10G\DATABASE\UNNAMED00007" as "......." has to be given to continue the recovery
    C:\>sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 10 18:50:28 2007

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Enter user-name: / as sysdba
    Connected to an idle instance.

    SQL> startup mount;
    ORACLE instance started.

    Total System Global Area 247463936 bytes
    Fixed Size 1248356 bytes
    Variable Size 67109788 bytes
    Database Buffers 176160768 bytes
    Redo Buffers 2945024 bytes
    Database mounted.
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 319468 generated at 04/10/2007 17:31:03 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00018_0619548088.001
    ORA-00280: change 319468 for thread 1 is in sequence #18


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 6: 'C:\TESTDB\DBFILE\DATA\USERS02.DBF'


    ORA-01112: media recovery not started


    SQL> select name from v$datafile;

    NAME
    -------------------------------------------------------------------------------

    D:\TESTDB\DBFILE\SYS\SYSTEM01.DBF
    C:\TESTDB\UNDOFILE\UNDOTBS01.DBF
    C:\TESTDB\DBFILE\SYS\SYSAUX01.DBF
    C:\TESTDB\DBFILE\DATA\USERS01.DBF
    C:\TESTDB\DBFILE\SYS\SYSTEM02.DBF
    C:\ORA10G\DATABASE\UNNAMED00006

    6 rows selected.

    SQL> alter database create datafile 'C:\ORA10G\DATABASE\UNNAMED00006' as 'C:\TE
    TDB\DBFILE\DATA\USERS02.DBF';

    Database altered.

    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 320190 generated at 04/10/2007 17:47:13 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00018_0619548088.001
    ORA-00280: change 320190 for thread 1 is in sequence #18


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00279: change 320675 generated at 04/10/2007 17:49:01 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00019_0619548088.001
    ORA-00280: change 320675 for thread 1 is in sequence #19
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00018_0619548088.001' no longer
    needed for this recovery


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00279: change 320857 generated at 04/10/2007 17:49:14 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00020_0619548088.001
    ORA-00280: change 320857 for thread 1 is in sequence #20
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00019_0619548088.001' no longer
    needed for this recovery


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00279: change 320951 generated at 04/10/2007 17:49:19 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00021_0619548088.001
    ORA-00280: change 320951 for thread 1 is in sequence #21
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00020_0619548088.001' no longer
    needed for this recovery


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 7: 'C:\TESTDB\DBFILE\DATA\USERS03.DBF'


    ORA-01112: media recovery not started


    SQL> select name from v$datafile;

    NAME
    -------------------------------------------------------------------------------

    D:\TESTDB\DBFILE\SYS\SYSTEM01.DBF
    C:\TESTDB\UNDOFILE\UNDOTBS01.DBF
    C:\TESTDB\DBFILE\SYS\SYSAUX01.DBF
    C:\TESTDB\DBFILE\DATA\USERS01.DBF
    C:\TESTDB\DBFILE\SYS\SYSTEM02.DBF
    C:\TESTDB\DBFILE\DATA\USERS02.DBF
    C:\ORA10G\DATABASE\UNNAMED00007

    7 rows selected.

    SQL> alter database create datafile 'C:\ORA10G\DATABASE\UNNAMED00007' as 'C:\TE
    TDB\DBFILE\DATA\USERS03.DBF';

    Database altered.

    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 321393 generated at 04/10/2007 17:54:08 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00021_0619548088.001
    ORA-00280: change 321393 for thread 1 is in sequence #21


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00279: change 321488 generated at 04/10/2007 17:54:28 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00022_0619548088.001
    ORA-00280: change 321488 for thread 1 is in sequence #22
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00021_0619548088.001' no longer
    needed for this recovery


    Specify log: {=suggested | filename | AUTO | CANCEL}

    ORA-00279: change 330272 generated at 04/10/2007 17:54:58 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00023_0619548088.001
    ORA-00280: change 330272 for thread 1 is in sequence #23
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00022_0619548088.001' no longer
    needed for this recovery


    Specify log: {=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00279: change 330380 generated at 04/10/2007 17:55:11 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00024_0619548088.001
    ORA-00280: change 330380 for thread 1 is in sequence #24
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00023_0619548088.001' no longer
    needed for this recovery


    ORA-00279: change 330527 generated at 04/10/2007 17:56:00 needed for thread 1
    ORA-00289: suggestion : C:\TESTDB\ADMIN\ARC\ARC00025_0619548088.001
    ORA-00280: change 330527 for thread 1 is in sequence #25
    ORA-00278: log file 'C:\TESTDB\ADMIN\ARC\ARC00024_0619548088.001' no longer
    needed for this recovery


    ORA-00308: cannot open archived log
    'C:\TESTDB\ADMIN\ARC\ARC00025_0619548088.001'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.


    SQL> alter database open resetlogs;

    Database altered.
    Last edited by simply_dba; 04-10-2007 at 09:30 AM.
    There are three kinds of lies: Lies, damned lies, and benchmarks...

    Unix is user friendly. It's just very particular about who it's friends are.

    Oracle DBA

  2. #12
    Join Date
    Jul 2003
    Posts
    136
    Thanks Simply_DBA and everybody.
    The information provided is very useful and helped the recovery.

    -D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width