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

how to define testing of network layers? : Sql server database administration

0 Answers  


Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

0 Answers  


What are types of storage modes? : sql server analysis services, ssas

0 Answers  


Explain filestream storage of sql server 2008?

0 Answers  


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

0 Answers  


What is SQL server agent?

2 Answers   HCL, SAP Labs,


what is package and it uses and how can u call a package

0 Answers   Satyam,


How to use old values to define new values in update statements in ms sql server?

0 Answers  


What is stored procedure in SQL..??

2 Answers  


How do you implement one-to-one, one-to-many and many-to- many relationships while designing tables?

4 Answers   Credit Suisse, GCU, Symphony, TCS,


How to modify the underlying query of an existing view?

0 Answers  


How can we improve performance by using SQL Server profiler?

0 Answers   QuestPond,


Categories