July 29, 2008 at 1:40 am
hai all,
how to find out the disk space from query analyser.
thanks in advance.
July 29, 2008 at 4:25 am
bhaskar.geddam (7/29/2008)
hai all,how to find out the disk space from query analyser.
thanks in advance.
To find out how much space your database is using, you can run a query like:
SELECT sysfiles.name AS LogicalFileName
, sysfiles.filename AS PhysicalFileName
, CAST(sysfiles.size / 128.0 AS int) AS FileSizeMB
, CAST(sysfiles.size / 128.0
- CAST(FILEPROPERTY(sysfiles.name, 'SpaceUsed') AS int) / 128.0 AS int) AS FreeSpaceMB
FROM dbo.sysfiles
If you would like to find out how much space your physical disk have left, you can use xp_fixeddrives
xp_fixeddrives
Regards,
Andras
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply