Sunday, March 25, 2018

Query to find schema size in the Oracle database

set linesize 120  
set pages 500

select owner,tablespace_name,sum(bytes)/1024/1024/1024 from dba_segments where owner in (‘<schema_name1>’,’<schema_name2>’) group by owner,tablespace_name;

Using the above query, we can find the following data:


Ø  Owner                                     à Schema owner
Ø  Tablespace_Name                  à tablespace in which the schema object resides
Ø  Sum(bytes)/1024/1024/1024  àused space (in GB) by the schema objects in the respective tablespace




No comments:

Post a Comment