How to find accurate database used size | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to find accurate database used size

How to find accurate database used size This is the output of "sp_spaceused" Db Name |Db_size |unallocated space
ABC|34700.00 MB |-47572.81 MB reserved |data |index_size |unused
74314560 KB |5828528 KB|8208968 KB|60277064 KB I don’t think this is correct output by sql server.
why this is showing wrong report and is there any other sp or any other way through which we can get the correct database used size report.
Rajeev Kumar Srivastava
Hi This is to update you on the above problem.
Actually it has been solved now by running DBCC UPDATEUSAGE(‘ABC’) this has updated the system table….. But still am not clear because few days back i have run the same dbcc but still i had got wrong report.Can any one tell me how to over come this problem, if it is not solved by dbcc UPDATEUSAGE.
Rajeev Kumar Srivastava
Is this you want? SELECT *, cntr_value/1024.0 as ‘MBs used’from master.dbo.sysperfinfo where
object_name = ‘SQLServer:Memory Manager’ and counter_name = ‘Total Server Memory (KB)’ Otherwise, I think you can find it in sysindexes table SELECT used AS "Pages" , rows AS "Rows" , OBJECT_NAME(id) AS TableName FROM sysindexes
Madhivanan Failing to plan is Planning to fail
Hi rajeev check this links:
it shows the possible cause and workaround.;en-us;183100
Run: USE YourDatabase
sp_spaceused @updateusage = ‘TRUE’ and check again. Luis Martin
Moderator One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.