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

Can you explain the disadvantages/limitation of the cursor?

930


Why we should not use triggers?

932


What is buffer cash and log cache in sql server?

1069


How to verify the port number of the sql server?

1070


Write the syntax for stuff function in an sql server?

993


What is faster join or union?

1132


Do you know clustered and non-clustered index?

947


What is the use of custom fields in report?

957


What are the different types of columns types constraints in the sql server?

1029


What is the datatype of rowid?

892


How raid can influence database performance?

981


Why do you want to join software field as you have done your BE in Electronics?

2114


How to loop through the result set with @@fetch_status?

1276


What is database dimension? : sql server analysis services, ssas

1048


What are the security related catalog views? : sql server security

925