May 8, 2012 at 10:46 am
Comments posted to this topic are about the item Total Space Used for all databases per disk
May 21, 2012 at 7:04 am
This doesn't take into account the use of mount points. Is there an easy substitution for xp_fixeddrives? Thanks.
May 21, 2012 at 6:13 pm
The script fails if you have any mirrored databases
May 23, 2012 at 11:55 am
Here's one way to deal with Mount points.
http://www.sqlservercentral.com/blogs/adventuresinsql/2010/11/15/get-drive-space-including-mount-points/[/url]
MCITP, Database Administrator
A hodgepodge of Information Technology and Life
LinkedIn Profile
My Twitter
May 23, 2012 at 12:03 pm
We do have a process to get disk/mount space via a powershell script. So we have that covered. I was just hoping that there was an easy replacement for xp_fixeddrives for this script.
May 23, 2012 at 12:17 pm
You could use a CLR as well.
A few more:
http://weblogs.sqlteam.com/tarad/archive/2007/12/18/60435.aspx
may look through the comments here:
MCITP, Database Administrator
A hodgepodge of Information Technology and Life
LinkedIn Profile
My Twitter
January 8, 2014 at 9:12 am
Awesome script. Very useful. One little bug in the #logsizestats table definition:
[DBName] varchar(65),
should be
[DBName] varchar(255),
causes string truncation on the sharepoint databases (or any other long name databases)
Thanks
Alex Donskoy
SQL Server DBA from Miami, FL
January 8, 2014 at 12:08 pm
brandon.lukes (5/23/2012)
We do have a process to get disk/mount space via a powershell script. So we have that covered. I was just hoping that there was an easy replacement for xp_fixeddrives for this script.
for SQL 2008R2 or above, sys.dm_os_volumne_stats (database_id, file_id) can be the substitute for xp_fixeddrives. you will need to rewrite somewhat the OP's script though.
January 9, 2014 at 11:04 am
aleksey donskoy (1/8/2014)
[DBName] varchar(65),should be
[DBName] varchar(255),
In at least sys.databases, database name is of SYSNAME type, which currently equates to nvarchar(128) NOT NULL. While I can understand using a VARCHAR(128) if one is certain the character set strictly fits within a VARHCAR, I'm a little puzzled as to where the choice of 255 bytes comes from.
January 9, 2014 at 1:08 pm
Nadrek (1/9/2014)
aleksey donskoy (1/8/2014)
[DBName] varchar(65),should be
[DBName] varchar(255),
In at least sys.databases, database name is of SYSNAME type, which currently equates to nvarchar(128) NOT NULL. While I can understand using a VARCHAR(128) if one is certain the character set strictly fits within a VARHCAR, I'm a little puzzled as to where the choice of 255 bytes comes from.
What's the point of your post? To paste one more Books Online paragraph?
May 10, 2016 at 1:45 pm
Thanks for the script.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply