Solved

schema space

Posted on 2014-04-04
4
366 Views
Last Modified: 2014-04-06
How will find the space occupied by individual schema in a database........
0
Comment
Question by:tonydba
  • 2
  • 2
4 Comments
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
select sum(bytes) from  dba_segments where owner = 'YOUR_SCHEMA'
0
 

Author Comment

by:tonydba
Comment Utility
I want to list out everything in one query.........
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
I have no idea what you mean by that, but here are some guesses.

SELECT segment_name, bytes, segment_type
  FROM dba_segments
 WHERE owner = 'YOUR_SCHEMA';

if you want multiple schemas

SELECT owner, segment_name, bytes, segment_type
  FROM dba_segments
ORDER BY owner;

you can also sum by schema

  SELECT owner,SUM(bytes)
    FROM dba_segments
GROUP BY owner;

or sum by schema and type

  SELECT owner, segment_type, SUM(bytes)
    FROM dba_segments
GROUP BY owner, segment_type
ORDER BY owner, segment_type;
0
 

Author Closing Comment

by:tonydba
Comment Utility
Thank you for your support.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now