Thanks for the question, jessy.
Asked: October 05, 2021 - 4:41 am UTC
Last updated: October 08, 2021 - 2:23 am UTC
Version: 19.3.0.0
Viewed 1000+ times
You Asked
Hey tom i wanted to ask a simple thing, i wanted to know when do we need to recover a tablespace when we alter the tablespace offline temporary. i heard that sometimes we need to recover it especially when there is an offline tablespace when we alter the table space to offline temporary is this true or we dont have to recover a tablespace when we alter the tablespace to offline temporary?
and Connor said...
I'm not *entirely* sure I understand that very very long sentence :-)
If you take a tablespace offline, we ensure that are no transactions active on it, and hence taking it offline keeps it in a consistent fashion. So you can just put it back online without any recovery.
If you take a tablespace offline with the *immediate* keyword, we do NOT ensure that are no transactions active on it, and hence taking it offline means it will need recovery before you can bring it online again. Similarly, if a tablespace goes offline "by itself", ie, something went wrong with the tablespace/datafiles/OS etc, then for the same reason we will need to do recovery to ensure that it is consistent with the rest of the datbase.
Is this answer out of date? If it is, please let us know via a Comment