database:oracle:drop-tablespace
This is an old revision of the document!
Completely drop the tablespace and the associated data files
First, note all the datafiles associated with your tablespace:
SELECT DECODE(r, 1, tablespace_name, NULL) tablespace_name, file_name FROM (SELECT tablespace_name, file_name, rank() OVER (partition BY tablespace_name ORDER BY tablespace_name, file_name) r FROM dba_data_files ORDER BY tablespace_name, file_name )
Result:
{{:database:oracle:pasted:20230309-153743.png}}
DROP TABLESPACE USER_WORK including contents;
database/oracle/drop-tablespace.1678369074.txt.gz · Last modified: 2023/07/04 19:36 (external edit)