Dropping Datafiles - Oracle 10g

There is no SQL statement that specifically drops a datafile. The only means of dropping a datafile is to drop the tablespace that contains the datafile. For example, if you want to remove a datafile from a tablespace, you could do the following:

  1. Create a new tablespace
  2. Move the data from the old tablespace to the new one
  3. Drop the old tablespace

You can, however, drop a tempfile using the ALTER DATABASE statement. For example:

ALTER DATABASE TEMPFILE '/u02/oracle/data/lmtemp02.dbf' DROP INCLUDING DATAFILES;

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 10g Topics