Oracle:没有dba privs时如何检查表空间使用的空间 [英] Oracle: how to check space used by a tablespace when no dba privs
问题描述
我需要检查表空间使用的空间,但是我没有dba privs.有办法吗?
I need to check space used by a tablespace but I have no dba privs. Is there a way to do this?
推荐答案
不幸的是,没有对dba_free_space
或dba_segments
视图的显式权限,您将无法使用用户的默认表空间:
Unfortunately without explicit permissions to the dba_free_space
or dba_segments
views you are stuck with your users default tablespace:
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视图上没有查询:
If you need to check the size of a tablespace for which you don't have a user with that as their default tablespace you're stuck with going back to your DBA.
Test with the system tablespace as default:
Test with an app tablespace as the default tablespace:
This schema does not have query on the dba views:
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
这篇关于Oracle:没有dba privs时如何检查表空间使用的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!