Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Size of the database

Author  Topic 

sven2
Yak Posting Veteran

57 Posts

Posted - 2009-12-21 : 05:10:02
Hello,

when I click on properties on the database name I can see the size of the database like 40 MB and the available space like 15 MB. So the actual size of the databse is 25 MB. How can I determine how much the database wil grow a day by using it?

Is there a way to figure this out?

Thanks in advance,
Sven.

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-12-21 : 07:14:32
How much the growth will be is of course linked to how much activity there is in the database and how much data you insert. If you want to trend the filegrowth you can log the results of the following query to a table once a day or something and make estimates based on the results:
select
a.FILEID,
NAME = a.NAME,
[FILE_SIZE_MB] = convert(decimal(12,2),round(a.size/128.000,2)),
[SPACE_USED_MB] = convert(decimal(12,2),round(fileproperty(a.name,'SpaceUsed')/128.000,2)),
[FREE_SPACE_MB] = convert(decimal(12,2),round((a.size-fileproperty(a.name,'SpaceUsed'))/128.000,2)) ,
FILENAME = a.FILENAME
from
dbo.sysfiles a


- Lumbago
http://xkcd.com/327/
Go to Top of Page

svicky9
Posting Yak Master

232 Posts

Posted - 2009-12-21 : 16:10:31
i generally use sp_spaceused daily to check the database sizes
For table size I use sp_spaceused 'TableSize'

http://www.sqlserver007.com
Go to Top of Page
   

- Advertisement -