Oracle中查詢當前數據庫中的所有表空間和對應的數據文件語句命令
-----------------------------------------------------------------------------------------
1、在cmd中輸入sqlplus,彈出命令行窗體
2、輸入口令和密碼
3、SQL>col file_name for a60;
4、SQL>set linesize 160;
5、SQL>select file_name,tablespace_name,bytes from dba_data_files;
---------------------------------------------------------------------------------------------
同樣的可以從dba_temp_files數據字典中查詢臨時表空間的信息
SQL>select tablespace_name,file_name from dba_temp_files;
----------------------------------------------------------------------------------------------
刪除Oracle表空間與表空間文件語句如下:
SQL>drop tablespace 表空間名稱 including contents and datafiles ;
示例:

--刪除Oracle表空間和文件的語句命令
drop tablespace 表空間名稱 including contents and datafiles cascade constraints;
--including contents 刪除表空間中的內容
--datafiles 刪除表空間中的數據文件
--cascade constraints 刪除所有與表空間數據有關的級聯,如主外鍵等
----------------------------------------------------------------------------------------------
