oracle维护常用命令收集

查询数据库表空间容量和数据量

 SELECT a.tablespace_name ,

 total,

 free,

 (total - free),

 total / (1024 * 1024 * 1024) "TS(G)",

 free / (1024 * 1024 * 1024) "TSfree(G)",

 (total - free) / (1024 * 1024 * 1024) "TSuse(G)",

 round((total - free) / total, 4) * 100 "BaiFenBi %"

 FROM (SELECT tablespace_name, SUM(bytes) free

  FROM dba_free_space

      GROUP BY tablespace_name) a,

             (SELECT tablespace_name, SUM(bytes) total

      FROM dba_data_files

       GROUP BY tablespace_name) b

 WHERE a.tablespace_name = b.tablespace_name


ASMCMD查询存储使用情况

ls -s

lsdg

猜你喜欢

转载自blog.51cto.com/551173/2369957