查看无法扩展的段.sql

来自「oracle 10g管理员管理数据库SQL,好资料!」· SQL 代码 · 共 29 行

SQL
29
字号
SELECT segment_name,
       
       segment_type,
       
       owner,
       
       a.tablespace_name "tablespacename",
       
       initial_extent / 1024 "inital_extent(K)",
       
       next_extent / 1024 "next_extent(K)",
       
       pct_increase,
       
       b.bytes / 1024 "tablespace max free space(K)",
       
       b.sum_bytes / 1024 "tablespace total free space(K)"

  FROM dba_segments a,
       
       (SELECT tablespace_name, MAX(bytes) bytes, SUM(bytes) sum_bytes
          FROM dba_free_space
         GROUP BY tablespace_name) b

 WHERE a.tablespace_name = b.tablespace_name
      
   AND next_extent > b.bytes

 ORDER BY 4, 3, 1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?