Collections:
Keep Data Files When Tablespace Dropped in Oracle
What Happens to Data Files If a Tablespace Is Dropped in Oracle?
✍: FYIcenter.com
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 2 AND DATAFILES; Tablespace dropped.
With the INCLUDING CONTENTS AND DATAFILES clause, all contents and mapped data files are also deleted.
⇒ Create a Table in a Given Tablespace in Oracle
2019-01-01, 3618🔥, 0💬
Popular Posts:
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Ex...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...