|
|
|
Forum 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
|
|
|
|
|
Valued 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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 20, 2012 4:44 AM
Points: 3,
Visits: 63
|
|
|
|
|
|
SSC 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.
|
|
|
|
|
Ten 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
|
|
|
|