User Tools

Site Tools


database:oracle:drop-tablespace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
database:oracle:drop-tablespace [2023/03/09 15:37] – created odeftadatabase:oracle:drop-tablespace [2023/07/04 19:36] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Completely drop the tablespace and the associated data files ======+====== Completely drop tablespace and all the associated data files ====== 
 + 
 +===== Check data files location =====
  
 First, note all the datafiles associated with your tablespace:  First, note all the datafiles associated with your tablespace: 
Line 14: Line 16:
  
 Result: Result:
-<code>+
 {{:database:oracle:pasted:20230309-153743.png}} {{:database:oracle:pasted:20230309-153743.png}}
 +
 +The ST_SERVERLOG tablespace has 2 data files:
 +  * /opt/oracle/oradata/ORACLE19C/datafile/o1_mf_st_serve_js7jhf9y_.dbf
 +  * /opt/oracle/oradata/ORACLE19C/datafile/o1_mf_st_serve_js7jqjb3_.dbf
 +
 +===== Remove tablespace =====
 +
 +<code sql>
 +DROP TABLESPACE ST_SERVERLOG including contents;
 </code> </code>
 +
 +<note>
 +This will not remove the data files from the disk, so the space will remain occupied.
 +</note>
 +
 +===== Drop data files =====
 +
 +Manually go on the disk and remove the associated data files.
 +If those files are not in use by any tablespace, the Oracle will let you remove them.
  
  
-  DROP TABLESPACE USER_WORK including contents; 
  
  
      
  
database/oracle/drop-tablespace.1678369074.txt.gz · Last modified: 2023/07/04 19:36 (external edit)