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?

Answers were Sorted based on User's Feedback



Syntax to find the used space and free space of the Data file in a database(SQL Server). Following..

Answer / 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

Syntax to find the used space and free space of the Data file in a database(SQL Server). Following..

Answer / allah baksh

exec sp_spaceused [schema.tablename] this will give you
data file and the size available

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What do you understand by a view? What does the with check option clause for a view do?

0 Answers  


how to trace the traffic hitting a sql server? : Sql server database administration

0 Answers  


Tell me what do you mean by an execution plan? Why is it used? How would you view it?

0 Answers  


What stored by the model? : sql server database administration

0 Answers  


what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

0 Answers  


What is the difference between Normalization and De-normalization?

0 Answers   TCS,


What are the 7 disadvantages to a manual system?

0 Answers  


How to edit table in sql server 2017?

0 Answers  


What is equi join with example?

0 Answers  


How data can be copied from one table to another table?

0 Answers  


What is 3nf normalization form?

0 Answers  


Why do we use stored procedures in sql server?

0 Answers  


Categories