Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

schema space

How will find the space occupied by individual schema in a database........
0
tonydba
Asked:
tonydba
  • 2
  • 2
1 Solution
 
sdstuberCommented:
select sum(bytes) from  dba_segments where owner = 'YOUR_SCHEMA'
0
 
tonydbaAuthor Commented:
I want to list out everything in one query.........
0
 
sdstuberCommented:
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
 
tonydbaAuthor Commented:
Thank you for your support.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now