What is using Oracle database space? (“ORA-12953: … exceeds the maximum allowed database size”)

StackOverflow https://stackoverflow.com/questions/10827911

  •  11-06-2021
  •  | 
  •  

Question

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?

Was it helpful?

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.

OTHER TIPS

There are several DBA views, which look at several different aspects of "space":

* dba_free_space

* dba_data_files

* dba_tablespaces

Here are several simple - and useful - scripts:

I would definitely look at these scripts:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top