check the database growth..

How  to calculate growth of the database since  last one month?
expertblrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MohanKNairCommented:
Compare the contents dba_extents last month and today. Take a snapshot of the data every month.

create table my_extents_data as select * from dba_extents where 1=2;
alter table my_extents add(curdt date);

Run this command every month

insert into my_extents_data(curdt, OWNER,SEGMENT_NAME,PARTITION_NAME,SEGMENT_TYPE,TABLESPACE_NAME,EXTENT_ID,FILE_ID,BLOCK_ID,BYTES,BLOCKS,RELATIVE_FNO) select sysdate, OWNER,SEGMENT_NAME,PARTITION_NAME,SEGMENT_TYPE,TABLESPACE_NAME,EXTENT_ID,FILE_ID,BLOCK_ID,BYTES,BLOCKS,RELATIVE_FNO from dba_extents;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
expertblrAuthor Commented:
alter table my_extents add(curdt date);

I think its is :

alter table my_extents_data add(curdt date);

But this table contains only what having the dba_extents ...

>Compare the contents dba_extents last month and today. Take a snapshot of the data every month.

what fields i need to compare...

Please explain detail...
0
expertblrAuthor Commented:
Thinks so i need to check the sum of blocks... right..

select sum(blocks) from dba_extents;

It will give the total sum of blocks of the database... right...

If not explain how?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

MohanKNairCommented:
select a.dbsize, b.dbsize
FROM
(select round(sum(bytes)/(1024*1024)) dbsize from dba_extents) a,
(select round(sum(bytes)/(1024*1024)) dbsize from my_extents_data where to_char(curdt,'mmyyyy')='062006') b;
0
johnsoneSenior Oracle DBACommented:
Instead of DBA_EXTENTS, you could look at DBA_SEGMENTS.  DBA_SEGMENTS rolls up the extent information to the object level.  I am not sure of the detail you are looking for, but DBA_SEGMENTS should do the job with a less data.
0
expertblrAuthor Commented:
Jonesone,

will u please give the query with the dba_segments..
0
johnsoneSenior Oracle DBACommented:
Same queries, just change the view name.

create table my_segments as select * from dba_segments where 0=1;
alter table my_segments add load_date date;
insert into my_segments select a.*, sysdate from dba_segments a;

That would give you the data to look at.  From there, you could slice and dice it any way you want.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

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.