Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

check the database growth..

Posted on 2006-07-13
7
Medium Priority
?
1,528 Views
Last Modified: 2010-08-05
How  to calculate growth of the database since  last one month?
0
Comment
Question by:expertblr
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 16

Accepted Solution

by:
MohanKNair earned 60 total points
ID: 17099274
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
 

Author Comment

by:expertblr
ID: 17099420
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
 

Author Comment

by:expertblr
ID: 17099488
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 16

Expert Comment

by:MohanKNair
ID: 17099512
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
 
LVL 35

Expert Comment

by:johnsone
ID: 17100595
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
 

Author Comment

by:expertblr
ID: 17101082
Jonesone,

will u please give the query with the dba_segments..
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 40 total points
ID: 17101969
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to recover a database from a user managed backup

618 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