Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Syntax to find the used space and free space of the Data
file in a database(SQL Server). Following queries didn't
give the exact Used space and Free Space Information
sp_spaceused;DBCC showfilestats;exec
MyDbName.dbo.sp_spaceused;SP_HELPFILE

Can any one tell me the query for how to find the exact
used data file space and free space in a Data File?

Answer Posted / narasimha

SELECT name ,size/128.0 - CAST(FILEPROPERTY
(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is normalization process?

1182


In which files does sql server actually store data?

909


What are distributed partitioned views?

1084


what are defaults? : Sql server database administration

1098


How to provide login information for a new odbc dsn?

1052


how many triggers you can have on a table? : Sql server database administration

984


Can foreign key be duplicate?

1069


How retrieve field names from the table in SQL through JAVA code?

1916


What are cursors in ms sql server?

1185


Please explain what is “asynchronous” communication in sql server service broker?

942


How to concatenate two strings in SQL Server.

1153


Can We Use Data-grids For Our Report In Ssrs?

184


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

1753


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

985


what is raid? : Sql server database administration

1048