回覆列表
  • 1 # 使用者6345928889356

    1. 檢視所有表空間大小SQL> select tablespace_name,sum(bytes)/1024/1024 from dba_data_files 2 group by tablespace_name;2. 已經使用的表空間大小SQL> select tablespace_name,sum(bytes)/1024/1024 from dba_free_space 2 group by tablespace_name;3. 所以使用空間可以這樣計算select a.tablespace_name,total,free,total-free used from ( select tablespace_name,sum(bytes)/1024/1024 total from dba_data_files group by tablespace_name) a, ( select tablespace_name,sum(bytes)/1024/1024 free from dba_free_space group by tablespace_name) bwhere a.tablespace_name=b.tablespace_name;4. 下面這條語句檢視所有segment的大小。Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name5. 還有在命令列情況下如何將結果放到一個檔案裡。SQL> spool out.txtSQL> select * from v$database;SQL> spool off

  • 中秋節和大豐收的關聯?
  • 漢蘭達升級兩分頻有難度嗎?為什麼?