Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Track database growth Expand / Collapse
Author
Message
Posted Sunday, April 04, 2010 4:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, January 16, 2013 12:21 AM
Points: 4, Visits: 186
Irwan,

I like your script. But one thing I need to point out is that 'master..xp_fixeddrives' doesn't work with the mounted volumes supported by sql2005 and above.

Ed
Post #896376
Posted Sunday, April 04, 2010 5:21 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, March 20, 2013 5:28 PM
Points: 64, Visits: 282
Hi Ed

Thanks for letting me know, I guess when I wrote the script it is purely to ensure that I know when my databases are running out of space, as for mounted volumes, I won't normally put my databases in there.

Regards

Irwan
Post #896505
Posted Tuesday, July 19, 2011 12:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 20, 2012 4:44 AM
Points: 3, Visits: 63
Thanks, it works fine
Post #1143874
Posted Friday, July 22, 2011 9:51 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Yesterday @ 1:32 AM
Points: 48, Visits: 258
Mike Tutor (2/22/2010)
Thanks for the great script. I created a table with a capture date and put your script (with some minor modifications) into a weekly job. This way I can keep a history of database growth and use it for charting expected growth etc.

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBStats]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DBStats]
GO

CREATE TABLE [dbo].[DBStats] (
...
GO


And that's what makes this useful. We need to know how much a file has grown over a period of time, and predict how much it will grow in the future.
Post #1146765
Posted Wednesday, August 10, 2011 2:18 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:39 PM
Points: 1,133, Visits: 856
Hi Irwan,

I had to do a :
FileCurrentSize = (cast(SF.size as bigint) * 8)/1024,

in order to avoid an integer overflow.

Best regards,
Henrik Staun Poulsen
www.stovi.com



Post #1157451
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse