Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calculating space

0 views
Skip to first unread message

ph3ng

unread,
Jul 16, 2008, 11:27:56 PM7/16/08
to
Hello

I am a junior dba. I was wondering if anyone could point me how to do
the following?:

I am currently trying to verify/calculate the size of my current
oracle db/schema. I've been using:

select sum(bytes)/1024/1024 from dba_data_files + select sum(bytes)/
1024/1024 from v$log;

(NOTE: I ran the two select statements separately. Just thought I'd
clarify)

Now I'd like to be able to know the size of the actual storage/disk
for where that particular schema is sitting on. Is this possible? If
so how would I be doing this, what is the syntax?

Thank you

Hardik

unread,
Jul 17, 2008, 6:00:53 AM7/17/08
to
select sum(bytes)/1024/1024 from dba_segments where owner=<SCHEMA>;

Mark D Powell

unread,
Jul 17, 2008, 12:59:17 PM7/17/08
to
> > Thank you- Hide quoted text -
>
> - Show quoted text -

For your total database storage usage you may also need to include the
space used for sort which if a true temporary tablespace was defined
will not be in dba_data_files. Loot at dba_temp_files.

HTH -- Mark D Powell --

joel garry

unread,
Jul 17, 2008, 2:36:10 PM7/17/08
to

There are a lot of definitions of "size." I give each schema their
own explicit storage (with one pseudo-DW exception), so I can just
look at the OS files. Another way is to look at the size of the
export. I've given up on actually doing selects for this stuff, I
just use OEM or EM, know right away if I need to worry about
anything. I tend to make data files fixed 2G, except for the most
recent one, which I make autoextend max 2G. So I really just have to
watch a few autoextend files, and even that is just because I haven't
gotten around to tweaking the alerts.

Works for my particular needs. Archived logs and rman backups require
much more careful observation as far as space used goes.

jg
--
@home.com is bogus.
"The Piper Cub is the safest airplane in the world; it can just barely
kill you. " - Attributed to Max Stanley ( Northrop test pilot)

0 new messages