Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 947
kinkajou Avatar asked Feb 20 '23 07:02

kinkajou


1 Answers

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.

like image 169
Justin Cave Avatar answered Feb 23 '23 21:02

Justin Cave