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 Dedicated Administrator Connection in sql server 2005?
what is procedure in sql?
Observed that some SP’s / Jobs are processing late, how to troubleshoot to improve performance?
What is meant by referential integrity?
What are the transaction properties?
Difference between writing SQL query and stored procedure ?
15 Answers Cognizant, Infosys, TCS, Veritas,
explain the storage models of olap? : Sql server database administration
What is stored procedure in SQL..??
How to find the latest updated value in a table without sending any parameters to that query
What are the advantages of user-defined functions over stored procedures in sql server?
Why do we use sql limitations? Which constraints can we use while making a database in sql?
How to configure and test odbc dsn settings?