In today’s article, we will be learning how to take an online tablespace offline so that it is temporarily unavailable for general use.
If a tablespace is made “Offline”, the data files belonging to that tablespace will also be offline.
When a tablespace is made “Offline”, the “CHECKPOINT” operation occurs.
When a tablespace is made ‘Online’ again, no “Media Recovery” process is required.
To Take a Tablespace Offline give the following command:
1 |
SQL> alter tablespace <tablespace_name> offline; |
To again bring it back online give the following command.
1 |
SQL>alter tablespace <tablespace_name> online; |
Tablespace can also be made offline as “IMMEDIATE” if desired.
But in this case, the “Checkpoint” transaction does not occur.
In this case, it is necessary to perform media recovery.
1 |
SQL> alter tablespace <tablespace_name> offline immediate; |