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 |
Is it possible we can connect our SQL database to GUI application? If it is yes than how tell me the explanation
How can I track the changes or identify the latest insert-update-delete from a table?
How to provide values to user defined function parameters?
Is natural join and equi join same?
Explain subquery and state its properties?
How can we Use Linked Server? Uses of Linked server
What is the difference between 2-Tier architecture and 3-Tier architecture
15 Answers CTS, MCN Solutions, Oracle,
How to loop through the result set with @@fetch_status?
What is the recursive stored procedure in sql server?
how many bits ip address consist of? : Sql server database administration
What is onf in normalization form?
How to create a scrollable cursor with the scroll option?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)