How to check size of a schema in Oracle
Check Schema size in Oracle
A schema in an Oracle database is defined as a collection of database objects and is owned by a database user. The schema name shares the same name as the user due to which both the terms are sometimes used interchangeably though they are not the same.
The below query will be useful while performing activities like export-import, request from the application team, pre-checks before performing any schema level activities.
Below is SQL query to find schema size in MB or GB. Click here for sample output.
col OWNER for a30 col SCHEMA_SIZE_MB for 999999 select owner,sum(bytes)/1024/1024 schema_size_MB from dba_segments where owner='TESTUSER4' group by owner; prompt $$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$ OR col OWNER for a30 select owner,sum(bytes)/1024/1024/1024 schema_size_GB from dba_segments where owner='TESTUSER4' group by owner; prompt $$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$
We always encourage the technical person to visit section SCRIPTS to get more daily usage SQL commands.
Hope so you like this script!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.
453 total views, 1 views today
Hello and welcome to DBsGuru,
I am Sruti Banerjee, having experience of 3 years as an Oracle DBA, I have good interpersonal skills that can help in attaining the desired level of team coordination, self-starter & quick learner. I am having rich experience in Oracle database management, Backup and Recovery, Security, Installation, Up-gradation, Patching, Migration, Cloning of databases, Dataguard (Physical), and a wide range of other database administration activities.
Thanks for the visits!
Share Learn Grow!
Very nice article to check Oracle schema size. Publish for PostgreSQL as well.
Thanks Santosh for review! We will publish soon.
Thanks.
Team DBsGuru.