Solved

schema space

Posted on 2014-04-04
4
367 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
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 73

Accepted Solution

by:
sdstuber earned 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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.

786 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