What Happens to the Data Files If a Tablespace Is Dropped?
Page 1 of 1
What Happens to the Data Files If a Tablespace Is Dropped?
If a tablespace is dropped, what happens to its data files? By default, data files will remain in OS file system, even if the tablespace they are mapped is dropped. Of course, you delete the data files using OS commands, if they are no longer needed.
Another way of deleting data files is to use the INCLUDING clause in the DROP TABLESPACE
statement. Here is a SQL sample script:
SQL> CREATE TABLESPACE my_space
2 DATAFILE '/temp/my_space.dbf' SIZE 10M;
Tablespace created.
SQL> DROP TABLESPACE my_space INCLUDING CONTENTS AND DATAFILES;
Tablespace dropped.
With the INCLUDING CONTENTS AND DATAFILES clause, all contents and mapped data files
are also deleted.
Another way of deleting data files is to use the INCLUDING clause in the DROP TABLESPACE
statement. Here is a SQL sample script:
SQL> CREATE TABLESPACE my_space
2 DATAFILE '/temp/my_space.dbf' SIZE 10M;
Tablespace created.
SQL> DROP TABLESPACE my_space INCLUDING CONTENTS AND DATAFILES;
Tablespace dropped.
With the INCLUDING CONTENTS AND DATAFILES clause, all contents and mapped data files
are also deleted.
Similar topics
» How a Tablespace Is Related to Data Files?
» Explain the relationship among Database, Tablespace and Data file.?
» How To View the Data Files in the Current Database?
» How Remove Data Files befor opening a Database?
» How To Recover a Dropped Table?
» Explain the relationship among Database, Tablespace and Data file.?
» How To View the Data Files in the Current Database?
» How Remove Data Files befor opening a Database?
» How To Recover a Dropped Table?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal