Basic Oracle Concepts and Programming Question:
How To Bring a Tablespace Offline?
Answer:
If you want to stop users using a tablespace, you can bring it offline using the ALTER TABLESPACE ... OFFLINE statement as shown in the following script:
SQL> connect HR/globalguideline
Connected.
SQL> CREATE TABLESPACE my_space
2 DATAFILE '/temp/my_space.dbf' SIZE 10M;
Tablespace created.
SQL> ALTER TABLESPACE my_space OFFLINE NORMAL;
Tablespace altered.
After bringing a tablespace offline, you can backup or rename the data file safely.
SQL> connect HR/globalguideline
Connected.
SQL> CREATE TABLESPACE my_space
2 DATAFILE '/temp/my_space.dbf' SIZE 10M;
Tablespace created.
SQL> ALTER TABLESPACE my_space OFFLINE NORMAL;
Tablespace altered.
After bringing a tablespace offline, you can backup or rename the data file safely.
Previous Question | Next Question |
How To See Free Space of Each Tablespace? | How To Bring a Tablespace Online? |