DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How to simulate a db crash ?

  1. #1
    Join Date
    Jan 2001
    Posts
    216
    Hi,

    I am testing our backup and recovery scripts using rman.
    One of the test cases that I am writing is to recover a tablespace in an open database.
    For that, I need to simulate an environment whenerein Oracle will give me an error saying "datafile ... needs media recovery" How can I do that ?

    Neelima

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    rename one data file and see what happens

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Jan 2001
    Posts
    216
    If I rename a datafile, I cannot take the tablespace offline in an open database recovery. It gives me the following error:

    RMAN-11003: failure during parse/execution of SQL statement: alter tablespace my_data offline temporary
    RMAN-11001: Oracle Error: ORA-01116: error in opening database file 8
    ORA-01110: data file 8: '/oradata/testdb1/my_data.dbf'
    ORA-27041: unable to open file
    SVR4 Error: 2: No such file or directory
    Additional information: 3

    RMAN>

    I even tried to edit the dbf file and delete some lines from it. It will not give me the error saying thatfile needs media recovery. May be I have to copy over an older version of that file ??


  4. #4
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    To perform this recovery, you would have to shutdown the database and mount and then do the recovery and then open it. I wouldn't (edited from "you shouldn't" to "I wouldn't") try doing the media recovery on an open database...

    refer: http://www.oradoc.com/ora816/server....eco.htm#443606

    Take the tablespace offline with IMMEDIATE and try. Else post your rman recovery script.


    Sam

    [Edited by sambavan on 09-18-2001 at 05:52 PM]
    Thanx
    Sam



    Life is a journey, not a destination!


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