檢視使用者的資料佔用的空間大小

楊奇龍發表於2010-06-11

在匯入匯出時,我們需要估計某使用者的資料佔用的空間大小,使用如下sql語句可以解決這個問題

SQL> select sum(bytes)/1024/1024 as sizeM from user_segments;

     SIZEM                                                                     
----------                                                                     
     .8125
                                                                     

SQL> conn system/yang as sysdba
已連線。
SQL> select owner,sum(bytes)/1024/1024 sizeM
  2  FROM DBA_SEGMENTS
  3  WHERE OWNER IN ('SYSTEM','SCOTT')
  4  GROUP BY OWNER ORDER BY 2 DESC;

OWNER                               SIZEM                                      
------------------------------ ----------                                      
SYSTEM                            24.1875                                      
SCOTT                               .8125                                      


 

                                 


 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-665071/,如需轉載,請註明出處,否則將追究法律責任。

相關文章