how to check size of database

  • how to check size of database

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • SELECT * FROM sysfiles.  This will provide the overall size of the database not what is really used



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • You can also run sp_spaceused with no parameters in the database you need to know the size of.


    When in doubt - test, test, test!

    Wayne

  • The function filerproperty(filename, property) can tell how much space is allocated to a specific file

    example:

    select name, fileproperty(name,'spaceused') as allocated,

       case fileproperty(name,'IsLogFile')

          when 0 then 'Data'

          else 'LOG'

       end as filetype

    from sysfiles

  • the above will give you the space USED but if you need the space ALLOATED (os size) then try

    sp_helpdb

    HTH


    * Noel

  • *CooL*

    i never thought its that complicated

    i just right clicked database and then select properties

    and there on the first tab u see the size of the database,

    thats the size which i told to my client

    Was I Correct ??

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • That will be the total size of your database, including any empty space.  It is possible for the transaction log or data file to have a lot of empty space if you have been running queries affecting a large number of rows.

    Another way is to click on the database in EM, then click View/Taskpad from the menu.  This will give you the use and total sizes for the data and transaction log.


    When in doubt - test, test, test!

    Wayne

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply