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

Thread: diff between restore datafile and restore tablespace

  1. #1
    Join Date
    Jan 2001
    Posts
    216

    Angry

    Hi,

    I am testing some backup and recovery scenarios and am kind of confused between restoring a datafile and restoring a tablespace.

    If I independently restore all the datafiles present in a tablespace, will that be equivalent to restoring the tablespace?

    I can simulate a datafile restore scenario by just renaming in os the name of the datafile to something else. How can I simulate a tablespace restore scenario?

    Thanks
    Neelima

  2. #2
    Join Date
    Aug 2000
    Posts
    236
    Yes - if you retore all the datafiles belonging to a TS, then consider the TS to be restored.

    A TS being a logical structure the only way to simulate is through datafiles like you did.

    Nizar

  3. #3
    Join Date
    Jan 2001
    Posts
    216
    Thanks so much for the quick response. That clarifies my doubts.

  4. #4
    Join Date
    Sep 2001
    Posts
    200
    I don't understand how you can ''silmulate a datafile restore by renaming it in the os". If you do this well, it is at the OS level but Oracle/Controlfile would need to know the new location. Then you would have to do AN ALTER DATABASE RENAME FILE ***** TO ******.
    Life is what is happening today while you were planning tomorrow.

  5. #5
    Join Date
    Jan 2001
    Posts
    216
    Here is how I simulate the datafile recovery:

    From the os, I just rename the file to something else.
    I could actually delete it, but I rename it just for safety.
    Next time oracle tries to read from that file, it will throw an error.
    Then I restore the file from the backup and recover the database.

    If this not the right way, please let me know.

    Thanks

  6. #6
    Join Date
    Jan 2001
    Posts
    216
    Well, after more thought, I had one more question.

    Could you give an example of a tablespace going bad?, because what I was thinking was, since a tablespace contains 1-n datafiles, if a tablespace goes bad and needs recovery, the users will have to run my recover_datafile script for each file present in the tablespace, that might be cumbersome.

    So, how and when can a tablespace as a full entity go bad? From what nabaig said, it looks like a tablespace as such does not go bad, it is the individual datafiles themselves that go bad, and even when the user gets an error message, it will ahve the name of the datafile in it.

    So, should I worry at all about writing scripts for recovering tablespaces or would it be enough to just write scripts for recovering datafiles?

    BTW we are using RMAN on Oracle 8.1.7

    Thanks,
    Neelima

  7. #7
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    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