DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: database size

  1. #1
    Join Date
    Jun 2001
    Location
    vienna
    Posts
    19
    hello all,

    can somebody explain me the best way to check the size of my database?

    thanx

    .the kid.

  2. #2
    Join Date
    Sep 2001
    Posts
    34
    Hie,
    I've a script which give you the growth of your DB during months.

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


    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')
    /

    tti off

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

    Have fun !!!

  3. #3
    Join Date
    Jun 2001
    Location
    vienna
    Posts
    19
    wow thank you.

    the kid.

  4. #4
    Join Date
    Oct 2001
    Posts
    83
    Hello,

    You can also obtain the free and used space through the system views : dba_free_space and dba_segments
    (select sum(bytes)/1024/1024 SIZE_Mo from sys.view_name)

    Best regards

  5. #5
    Join Date
    Jun 2001
    Location
    vienna
    Posts
    19
    @pwc

    i have just one more question.

    the creation_date from the datafiles is june 2001.

    is the result I get the growing size in MB from June 2001 till today?

    the kid.


  6. #6
    Join Date
    Oct 2001
    Posts
    83
    Hello,

    If you database was created in june 2001, using the script proposed by PWC will give you the size of you database.

    Suppose that you database was created in march 2001 and you added a file of 500 Mo in june 2001, using the script given, you result will be 500 Mo (growth : year - 1).

    Hope this help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width