?
Solved

schema space

Posted on 2014-04-04
4
Medium Priority
?
375 Views
Last Modified: 2014-04-06
How will find the space occupied by individual schema in a database........
0
Comment
Question by:tonydba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

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

Author Comment

by:tonydba
ID: 39978463
I want to list out everything in one query.........
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 39978507
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
ID: 39981538
Thank you for your support.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

801 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