dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Intermediate
Sep 21, 2017

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Using FILEPROPERTY to Check for Free Space in a Database

Learn how to use FILEPROPERTY to check for free space in a database.

SELECT DB_NAME() AS DBName, 
name AS FileName, 
size/128.0 AS MB, 
size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS 

INT)/128.0 AS FreeMB 
FROM sys.database_files;
Hannes du Preez
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date