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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a full-text index updated?

534


What is unique key constraint?

628


Why union all is faster than union?

506


What are types of subqueries?

555


List types of tables in SQL Azure?

102






Can group functions be used in the order by clause in ms sql server?

586


How to create a login account in ms sql server to access the database engine using "create login" statements?

565


How do I view a stored procedure in sql server?

515


What does it mean to normalize a database and why would you do it?

525


Sql server reporting services vs. Crystal reports.

96


‘Order by’ is not allowed in a view how can you sort information from a view?

582


What is the default port for SQL Server over a firewall?

587


How do I start and stop sql server?

541


What are the pre-defined functions in the sql server?

518


Explain sub-query?

566