Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

SQL Server world: Learning and Sharing my experience & knowledge ....
Browse by Tags · View All
sql server 51
best practices 39
#SQL Server 28
dba 25
BRH 19
beginners 17
download 15
#TSQL 15
dba practices 9
#DBA 9

Archive · View All
September 2010 13
August 2011 5
October 2010 5
November 2011 4
October 2011 4
May 2011 4
February 2011 4
November 2010 4
January 2012 3
July 2011 3

Quick way to find the free space on each filegroup within a database

Sep 21 2010 1:57PM by Satya Jayanty (@sqlmaster)   

A very quick way to find the free space in each file group within your SQL Server database is given below.

 

SELECT
	b.groupname AS 'File Group',
	Name, 
	[Filename],
	CONVERT (Decimal(15,2),ROUND(a.Size/128.000,2)) 
		[Currently Allocated Space (MB)],
	CONVERT (Decimal(15,2),
	ROUND(FILEPROPERTY(a.Name,'SpaceUsed')/128.000,2))
		AS [Space Used (MB)],
	CONVERT (Decimal(15,2),
	ROUND((a.Size-FILEPROPERTY(a.Name,'SpaceUsed'))/128.000,2))
		AS [Available Space (MB)]
FROM dbo.sysfiles a (NOLOCK)
JOIN sysfilegroups b (NOLOCK) ON a.groupid = b.groupid
ORDER BY b.groupname

Follow SQLMaster on Twitter

Tags: sql server, #SQL Server, free space, filegroup, tsql, #TSQL, BRH,


Satya Jayanty (@sqlmaster)
34 · 5% · 1720
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]