Size of schema in Oracle database 23AI

 

How to find the size of schema in the 23AI ORACLE Database.

SQL>  select sum(bytes)/1024/1024 "SIZE_IN_MB" from dba_segments;

SUM(BYTES)/1024/1024

--------------------

           1986.286

SQL>  select sum(bytes)/1024/1024/1024 "SIZE_IN_GB" from dba_segments;

SQL>  select owner,sum(bytes) from dba_segments group by owner;

SQL>  select OWNER,sum(bytes)/1024/1024 "SIZE_IN_MB" from dba_segments group by owner order by owner;

SQL > select owner, sum(bytes)/1024/1024/1024 "SIZE_IN_GB" from dba_segments group by owner;

SQL > SELECT sum(bytes)/1024/1024/1024 "SIZE_IN_GB" FROM dba_segments WHERE owner = 'SYSTEM';


#How to find the size of the table within schema#

SLQ > select segment_name,segment_type, sum(bytes/1024/1024/1024) GB from dba_segments

where owner='apps' and segment_type='TABLE' group by segment_name,segment_type;

#How to find the count of the table with schema name list#

SELECT COUNT(table_name),owner FROM DBA_TABLES GROUP by owner order by owner;

No comments:

How to add a datafile to a bigfile tablespace in Oracle 23ai Database.

  Syntax for Bigfile Tablespace: SQL > ALTER TABLESPACE tablespace_name ADD DATAFILE SIZE 10G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED; Ho...