查詢表空間使用情況

2021-08-29 21:53:53 字數 978 閱讀 9375

select owner,tablespace_name,segment_name,segment_type,sum(bytes)/1024/1024 sums from dba_extents

where owner='nbcheck' and segment_type='table'

group by owner,tablespace_name,segment_name,segment_type

order by sums

表空間的大小與使用者的配額大小是兩種不同的概念。表空間的大小是指實際的使用者表空間的大小,而配額大小指的是使用者指定使用表空間的的大小

把錶空間檔案增大,還是出現這個問題,使用者在使用表空間的同時使用空間的限額,如果超出限制,就算有空的地方,也不會讓使用者使用。

遇到ora-01536錯誤,首先要檢視使用者的表空間的限額

select * from dba_ts_quotas;

select * from user_ts_quotas;

max_bytes欄位-1是代表沒有限制,其它值多少就是多少. 

dba_ts_quotas :描述所有使用者表空間的限額

user_ts_quotas :描述當前使用者表空間的限額。

如果查詢結果中max_bytes欄位不為-1,修改為無限制或者指定的大小。

不對使用者做表空間限額控制:

grant unlimited tablespace touser;

這種方式是全域性性的。  或者

alter useruserquota unlimited onuser_tablespace;

這種方式是針對特定的表空間的.

**表空間限額控制:

revoke unlimited tablespace fromuser;

或者alter useruserquota 0 onuser_tablespace;

itpub個人空間"f6p*zt%hz(bgo

查詢oracle表空間使用情況

1.查詢表空間所在物理路徑及使用情況.select b.file id 檔案id,b.tablespace name 表空間,b.file name 物理檔名,b.bytes 總位元組數,b.bytes sum nvl a.bytes,0 已使用,sum nvl a.bytes,0 剩餘,sum n...

ORACLE SQL查詢表空間使用情況

oracle查詢表空間使用情況 oracle查詢表空間使用情況 select b.file id 檔案id號,b.tablespace name 表空間名,b.bytes 1024 1024 位元組數m,b.bytes sum nvl a.bytes,0 1024 1024 已使用m,sum nvl...

表空間使用情況統計

表空間剩餘空間查詢,以system使用者身份登入或具有dba許可權的使用者執行 select tbs as 表空間名稱,sum totalm as 空間合計m,sum usedm as 已使用空間,sum remainedm as 剩餘空間m,sum usedm sum totalm 100 as ...