Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the list of all tables from SQL database and their size in GB where the table doesn't start with "decom_"

Adi FadipeJan 19 2024

Hi, Can some one help me with a SQL Developer query to get the list of all the tables which doesn't start with “decom_” from my database with their size in GB. Below is what I have as of now which shows me the total size of all tables, but I need a list with each table name listed and the size against the same in GB and also I need to know how much space is free in each table and over all database. I can't use dba_segments in my query and I believe it has to do with my limited db access

“SELECT round (SUM (bytes) / 1024/1024/1024) AS ”Table Size (GB)" FROM user_segments WHERE segment_name NOT LIKE ‘decom_%’;

Thanks

Comments
Post Details
Added on Jan 19 2024
5 comments
7,120 views