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 |
application server is slow what may be the problem
Give some Scenario for Non Clusterd index? Can we write system defined functions in side The Function? Wat is the Unique Datatype?
How do I find sql server instance name?
If you are working on a SQL database and if suddenly a developer changes the code and your queries results start giving errors,how will you check using a T-SQL query (on system tables) that what has changed in the database.
What is dbcc command in sql server?
What is sql server 2000 work load governor?
What is oltp (online transaction processing)?
What is the difference between NOROW and LOCKROW?
0 Answers Accenture, Honeywell, Satyam,
What is the function of sql server agent windows service?
What is the difference between getdate and sysdatetime?
Do you know what are different types of replication in sql server?
How we create SQL Server 2005 Reporting Services ? Give me Sample
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)