Thursday, June 7, 2012

Simple script to find the free space in sql server db files (data, log) against all databases

Here is a simple SQL script to retrieve the free spaces on db files (data, log). The below script will give you the File size, used space and free space of currently selected database only. select       name     , filename     , convert(decimal(12,2),round(a.size/128.000,2)) as FileSizeMB     , convert(decimal(12,2),round(fileproperty(a.name,'SpaceUsed')/128.000,2))...
Pages (10)1234567 Next
 
© Copyright 2010-2012 Learn MySQL All Rights Reserved.
Template powered by Blogger.com.