在Oracle数据库中,您可以使用以下查询来查看数据库的总大小和表空间的使用情况:
SELECT SUM(bytes)/1024/1024 AS "Database Size (MB)" FROM dba_data_files;
SELECT tablespace_name, SUM(bytes)/1024/1024 AS "Tablespace Size (MB)", SUM(bytes)/1024/1024 - SUM(blocks)/1024/1024 AS "Tablespace Used (MB)"
FROM dba_data_files
GROUP BY tablespace_name;
SELECT table_name, SUM(bytes)/1024/1024 AS "Table Size (MB)"
FROM dba_segments
GROUP BY table_name;
请注意,以上查询需要具有适当的权限才能成功运行。