查看表空间和解决表空间扩容ORA-01119:ORA-27040问题

  • Post author:
  • Post category:其他


1、登录数据库查看表空间使用情况

su – oracle

sqlplus / as sysdba

SQL> select df.tablespace_name “tablespace_name”,

2 totalspace – freespace “used_mb”,

3 totalspace “total_spaceM”,

4 freespace “free_spaceM”,

5 round((1 – freespace / totalspace) * 100, 2) “used%”

6 from (select tablespace_name, round(sum(bytes) / 1024 / 1024) totalspace

7 from dba_data_files

8 group by tablespace_name) df,

9 (select tablespace_name, round(sum(bytes) / 1024 / 1024) freespace

10 from dba_free_space

11 group by tablespace_name) fs

12 where df.tablespace_name = fs.tablespace_name(+) order by round((1 – freespace / totalspace) * 100, 2) desc;

tablespace_name used_mb total_spaceM free_spaceM used%


USERS 443895 572412 128517 77.55

SYSAUX 826 1894 1068 43.61

SYSTEM 733 1764 1031 41.55

UNDOTBS1 30 1960 1930 1.53

2、查看数据文件路径位置

SQL> select file#,name from v$datafile;




版权声明:本文为qq_34861139原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。