September 28, 2017 at 2:03 pm
I have a database that says it's 108 GB USED - I verified with dbcc showfilestats as well as just clicking tasks-shrink file in SSMS. however when i run the built in report to show table sizes (including indexes), they only add up to about 75 GB? I know Service broker queues can take space, but i don't have any queues in this database. is there anything else?
Thanks,
Steven
September 29, 2017 at 6:25 am
Steve-443559 - Thursday, September 28, 2017 2:03 PMI have a database that says it's 108 GB USED - I verified with dbcc showfilestats as well as just clicking tasks-shrink file in SSMS. however when i run the built in report to show table sizes (including indexes), they only add up to about 75 GB? I know Service broker queues can take space, but i don't have any queues in this database. is there anything else?Thanks,
Steven
Any audit running on the database ? Is it a standalone database ?
September 29, 2017 at 6:57 am
There are no Audits running on the database. The database is on a clustered server, if that's what you mean.
Thanks!
September 29, 2017 at 7:02 am
ok, i found something about text fields. that is likely it.
September 29, 2017 at 8:10 am
Steve-443559 - Friday, September 29, 2017 7:02 AMok, i found something about text fields. that is likely it.
Can also look for VARCHAR(MAX) , another LOB type .
October 1, 2017 at 6:29 pm
Steve-443559 - Friday, September 29, 2017 7:02 AMok, i found something about text fields. that is likely it.
Two way street here... tell us what you found, please.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 28, 2017 at 3:53 pm
Heh... Right now I'm thinking, "Check-valve".
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2017 at 6:34 am
Sorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.
October 30, 2017 at 8:10 am
Steve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.
Hmmm... I've not previously seen the same kind of discrepancy before. Thanks for the heads up, Steve. I'll check it out.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2017 at 8:35 am
Steve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.
sp_spaceused could be incorrect as well. You may want to consider executing dbcc updateusage and see how things look after that:
DBCC UPDATEUSAGE
Sue
October 30, 2017 at 8:59 am
Sue_H - Monday, October 30, 2017 8:35 AMSteve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.sp_spaceused could be incorrect as well. You may want to consider executing dbcc updateusage and see how things look after that:
DBCC UPDATEUSAGESue
Use with some bit of caution, though. It can be a bit intensive resource usage wise.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2017 at 11:21 am
Jeff Moden - Monday, October 30, 2017 8:59 AMSue_H - Monday, October 30, 2017 8:35 AMSteve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.sp_spaceused could be incorrect as well. You may want to consider executing dbcc updateusage and see how things look after that:
DBCC UPDATEUSAGESue
Use with some bit of caution, though. It can be a bit intensive resource usage wise.
That's why I provided the link - explains the same. Has a Best Practices, recommendations section.
Sue
October 30, 2017 at 12:33 pm
Sue_H - Monday, October 30, 2017 11:21 AMJeff Moden - Monday, October 30, 2017 8:59 AMSue_H - Monday, October 30, 2017 8:35 AMSteve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.sp_spaceused could be incorrect as well. You may want to consider executing dbcc updateusage and see how things look after that:
DBCC UPDATEUSAGESue
Use with some bit of caution, though. It can be a bit intensive resource usage wise.
That's why I provided the link - explains the same. Has a Best Practices, recommendations section.
Sue
Understood. To be sure, although I was too brief in my post for you to think otherwise, the comment wasn't directed at you because you absolutely know what you're doing (can't help but notice your good posts over time... thanks for what you do). It was actually meant for the person(s) that read this thread but won't take the time to learn about your good suggestion by actually reading the link you provided.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2017 at 1:41 pm
Jeff Moden - Monday, October 30, 2017 12:33 PMSue_H - Monday, October 30, 2017 11:21 AMJeff Moden - Monday, October 30, 2017 8:59 AMSue_H - Monday, October 30, 2017 8:35 AMSteve-443559 - Monday, October 30, 2017 6:34 AMSorry, I was using the Disk Usage by Top Tables report and it was not totalling to the used size of my database, so i believe it's not calculating the size correctly. when I do a sp_spaceused <tablename>, it shows me a much larger index size than what is in the built in report and I believe it has something to do with the nvarchar(max) and XML fields in the table. I haven't dug into the code behind sp_spaceused and the built in report, but I'm sure it will explain the discrepancy.sp_spaceused could be incorrect as well. You may want to consider executing dbcc updateusage and see how things look after that:
DBCC UPDATEUSAGESue
Use with some bit of caution, though. It can be a bit intensive resource usage wise.
That's why I provided the link - explains the same. Has a Best Practices, recommendations section.
Sue
Understood. To be sure, although I was too brief in my post for you to think otherwise, the comment wasn't directed at you because you absolutely know what you're doing (can't help but notice your good posts over time... thanks for what you do). It was actually meant for the person(s) that read this thread but won't take the time to learn about your good suggestion by actually reading the link you provided.
Thanks for the clarification - I actually did think you were directing that towards me.
Good reminder as I never read the links I post. Just kidding of course. 🙂
Sue
October 30, 2017 at 2:14 pm
I've had problems finding where space was used and having it add up to the full amounts plenty of times. If you are using ServiceBroker and people aren't ending their conversations it can use up gigs of unreported space after a few months. Also, I vaguely remember heap space used not reporting correctly after many deletes.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply