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
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 |
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 |
What is the difference between varchar and varchar types?
Explain why variables called the most powerful component of ssis?
What is a db view?
Explain the basic concepts of SQL server architecture?
2 Answers College School Exams Tests,
How to insert data with null values?
Can you roll back the ddl statement in a trigger?
Explain few of the new features of sql server 2008 management studio
Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?
What is DAC? what is the use of it?
How to find the service pack installed? : sql server database administration
syntax and example for bitmap index in sql???
How to replace the Query Result 'Null Value' with a text ?