不幸的是,没有对
dba_free_space
或
dba_segments
查看用户默认表空间:
SELECT
ts.tablespace_name,
TO_CHAR(SUM(NVL(fs.bytes,0))/1024/1024, '99,999,990.99') AS MB_FREE
FROM
user_free_space fs,
user_tablespaces ts,
user_users us
WHERE
fs.tablespace_name(+) = ts.tablespace_name
AND ts.tablespace_name(+) = us.default_tablespace
GROUP BY
ts.tablespace_name;
如果您需要检查某个表空间的大小,而用户没有将其作为默认表空间,则必须返回DBA。
使用系统表空间作为默认值进行测试:
将应用程序表空间作为默认表空间进行测试:
此模式没有dba视图上的查询:
select * from dba_free_space;
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:
Error at Line: 13 Column: 15