Sep 302013
 
drop tablespace doesnt_free_disk_space_unless
including contents and datafiles;

Unless you're using Oracle managed files, in which case the 
datafiles are removed unless you specfically keep them!

For a quick and dirty example, keep reading or have a look at the docs.

-- you'll need access to the filesystem to see 
-- this. Disk usage goes up 100Mb after 
create tablespace doesnt_free_disk_space_unless
datafile 'im_still_here.dbf' size 100M;

-- but doesn't decrease after this; 
-- the file's still there!
drop tablespace doesnt_free_disk_space_unless; 

create tablespace doesnt_free_disk_space_unless
datafile 'im_still_here.dbf' size 100M reuse;

-- now we include contents, it's gone
drop tablespace doesnt_free_disk_space_unless
including contents and datafiles;

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)