发布网友 发布时间:2022-04-20 03:24
共1个回答
热心网友 时间:2022-05-01 03:02
查看那些库的话必须用dba权限登录。登陆后可以通过下面的方法来查看。
一、查看有哪些库,你的库理解不准确,应该准确来说是表空间,可以通过下面的命令来实现
SELECT Total.name "Tablespace Name",
Free_space, (total_space-Free_space) Used_space, total_space
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name = Total.name
二、查看有哪些表。
select table_name from dba_tables where owner='A';