Database Administration (MOSC)

MOSC Banner

order by not working in the query.

edited Jan 30, 2012 8:03AM in Database Administration (MOSC) 2 commentsAnswered ✓
I used the following query to get the database growth per month for the past year.

set pagesize 50000
tti "Database growth per month for last year"

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')
 order by to_char(creation_time, 'RRRR Month')
/

tti off

I ran this on a test database and got the following results:

Mon Jan 30                                                             page    1

                    Database growth per month for last year

 

Month          Growth in Meg

-------------- -------------

2011 July               4800

2011 June               1000

2011 March              3600

2011 May                1500

2011 October            1000

2011 September         22000

2012 January

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center