-
Hi
I have this db growth script which i put together but i dont think its working well. Can somebody look at it or have a better script?
select to_char(creation_time, 'RRRR Month') "Month",
sum(bytes)/1024/1024 "Growth in Meg"
from sys.v_$datafile
where creation_time > SYSDATE-365
group by to_char(creation_time, 'RRRR Month')
;
IT ONLY SHOWS ME DATA thru 2002 Jan.
Month Growth in Meg
-------------- -------------
2001 August 20800
2001 December 4000
2001 July 800
2001 June 7700
2001 November 2000
2001 October 48000
2002 February 8000
2002 January 2000
"High Salaries = Happiness = Project Success."
-
V$datafile will not tell you the growth of the database.
You need to query from dba_extents.
-
This script only shows you the cummulative size of newly added datafiles per month in the last year. For the months where there have been no datafiles added there is no row in the report.
So obviously there have been no new datafiles added since February2002 (as there has not been also in September 2001).
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Can you help me write it? I really wanna do the following:
tell me the growth of the database in months. How much it grew in megs each month until today and total size as of today
"High Salaries = Happiness = Project Success."
-
For the size of your database as of today at a glance (nothing fancy)
you can
1/ SQL> select sum(bytes)/1024/1024 from dba_data_files;
2/SQL> select sum(bytes)/1024/1024 from dba_FREE_Space;
then:
SQL> select (value1) - (value2) from dual;
or simply:
SQL> select sum(bytes)/1024/1024 from dba_extents;
All in Megs
Life is what is happening today while you were planning tomorrow.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|