November 21, 2013 at 6:52 pm
Hi,
We have deleted 120GB of data but space did not released even after 2 days. Is there any reason for this? Could any one tell me how exactly it releases the space after truncating a 120GB table?
Thanks.
Thanks,
I’m nobody but still I’m somebody to someone………….
November 21, 2013 at 8:08 pm
SQLAli (11/21/2013)
Hi,We have deleted 120GB of data but space did not released even after 2 days. Is there any reason for this? Could any one tell me how exactly it releases the space after truncating a 120GB table?
Thanks.
Space is not deleted from the database after deletes or truncates. It simply becomes unallocated space in the database. Do you have enough room on disk without recovering this space as truly "free space"?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2013 at 8:25 pm
If you absolutely have to get the disk space free, then you can use SHRINKDATABASE or SHRINKFILE, but it does awful things to your databases. You have to reindex them all etc... not pretty. So only do it if you have to. Definitely read up on it in BOL before doing anything drastic like that.
November 21, 2013 at 10:16 pm
Pietlinden,
Yes, we shrunk the .mdf and alert moves to Warning from centreon. But i think it is not right resolution.
Jeff,
I understand that space will simply unallocated rather than releasing. But disk got only 9GB free space. I need at least 50 GB of free space.
Thanks,
I’m nobody but still I’m somebody to someone………….
November 21, 2013 at 10:28 pm
SQLAli (11/21/2013)
Pietlinden,Yes, we shrunk the .mdf and alert moves to Warning from centreon. But i think it is not right resolution.
If you really do want to release space back to the OS, it's the *only* resolution.
I understand that space will simply unallocated rather than releasing. But disk got only 9GB free space. I need at least 50 GB of free space.
Why? What good does 50GB do sitting unallocated and unused on a disk do? You might as well make the disk 50GB smaller.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 22, 2013 at 9:02 am
I'm with Gail on this. If you need the space, then shrink the files, but make sure that you leave space to reindex or perform maintenance.
If you just want xxx space to prevent alarms, you should really evaluate whether you need more space on the drive. If it's for backups, please, please don't store these on the disk with the mdf.
December 16, 2013 at 2:01 pm
Did you try rebuilding table including all the indexes? That would release space to database, then shinking file would relase space at OS.
December 16, 2013 at 2:53 pm
Suneel,
No i did not try to rebuild the indexes. As i explained before i just shrunk the .mdf and space gets released.
Thanks,
I’m nobody but still I’m somebody to someone………….
December 16, 2013 at 4:25 pm
SQLAli (12/16/2013)
Suneel,No i did not try to rebuild the indexes. As i explained before i just shrunk the .mdf and space gets released.
You're pretty well screwed then because, except for simple truncation during a shrink, shrink fragments nearly everything to 99% fragmented. You at least need to follow a shrink with a REORGANIZE (although that will only fix the Leaf Level of the indexes and data). Since REORGANIZE doesn't update stats, you should update the stats, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply