Search code examples
oracle-databaseoracle-xeoracle11gr2

What is using Oracle database space? ("ORA-12953: ... exceeds the maximum allowed database size")


I just have materialized view (small no of rows) in my oracle database and nothing but my database is compalining :

Error report:
SQL Error: ORA-12953: The request exceeds the maximum allowed database size of 11 GB

select sum(size_in_mb) from 
(
SELECT owner,
       segment_name,
       segment_type,
       sum(bytes)/1024/1024 size_in_mb
  FROM dba_segments
 WHERE owner NOT IN ('SYS','SYSTEM')
 GROUP BY owner, 
          segment_name,
          segment_type
 ORDER BY SUM(bytes)/1024/1024
 );

How do I find how much space which is using in oracle?


Solution

  • I assume from the error that you are using the express edition of the database.

    SELECT owner,
           segment_name,
           segment_type,
           sum(bytes)/1024/1024 size_in_mb
      FROM dba_segments
     WHERE owner NOT IN ('SYS','SYSTEM')
     GROUP BY owner, 
              segment_name,
              segment_type
     ORDER BY SUM(bytes)/1024/1024
    

    will show you the size of the objects owned by users other than SYS and SYSTEM ordered by their size in MB.