How can I check my database growth rate?

dkim18
dkim18 used Ask the Experts™
on
Hi,

I have a sql server 2005 server on windows 2003 server.
My database files are on the same server.
I just found out i only have 300 mb of free space on this.

My server guy is asking what's my growth rate of my database.
Is there a way to check that?

Also I guess I should move my files to another server where I have no restrictions.
How can I do that?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Consultant
Top Expert 2009
Commented:
check the db space used at the same time on a daily basis , then you can calculate an average growth ratte
This little query has helped me several times doing the same thing. If critical, you could create a supporting database dedicated to storing running values every x period of time. I have this same query running on a monitoring application similar to NAGIOS to alert me if I am outgrowing allocated space too quickly. Just make sure you use the logical file name you need on your WHERE clause as:
WHERE NAME = [logical data file name]

use master
go
select 
	name,
	ROUND(((cast (size as float)-cast (fileproperty(name,'SpaceUsed') as float))/cast (size as float))*100,2) as PERCENTFREE 
from sysfiles 
where name = 'master'

Open in new window

To clarity, you can adapt that query to reflect total size, space left unallocated, etc...
Just play with it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial