Wednesday, March 7, 2012

Freeing space after deleting records.

I deleted some records that contain blob data from a
table but realized no effect to my physical disk space.
Shrinking the table and/or database returned no positive
impact. executed sp_spaceused on the table with no
effect.
Should I truncate the table to release the space? Truncate
will delete all records and that's not what is
expected.
I was expecting that after deleting the blob record
holding 723556kb of file, this space should be released to
the os level of my server. hence if I had 2gigs of free
space, I should now have at least 2.7 gigs. This wasn't
the case -- even at sql sever level, the space is still
not released.
I appreciate your immediate response.
StokoCheck back in the archives, a few weeks. There was some discussion about the
same topic and if my memory serves me, to free space for blobs, you need to
re.load the table. I'm not sure about the details, so, I suggest you check
the archives to make sure.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"stoko" <anonymous@.discussions.microsoft.com> wrote in message
news:077501c3faf2$b2fdc130$a501280a@.phx.gbl...
> I deleted some records that contain blob data from a
> table but realized no effect to my physical disk space.
> Shrinking the table and/or database returned no positive
> impact. executed sp_spaceused on the table with no
> effect.
> Should I truncate the table to release the space? Truncate
> will delete all records and that's not what is
> expected.
> I was expecting that after deleting the blob record
> holding 723556kb of file, this space should be released to
> the os level of my server. hence if I had 2gigs of free
> space, I should now have at least 2.7 gigs. This wasn't
> the case -- even at sql sever level, the space is still
> not released.
> I appreciate your immediate response.
> Stoko
>|||Hi,
Execute the below commands
sp_spaceused table_name,@.updateusage ='TRUE'
go
Update statistics table_name
After this check the space utilized by the table and then use DBCC
SHRINKFILE to shrink the physical file.
Thanks
Hari
MCDBA
"stoko" <anonymous@.discussions.microsoft.com> wrote in message
news:077501c3faf2$b2fdc130$a501280a@.phx.gbl...
> I deleted some records that contain blob data from a
> table but realized no effect to my physical disk space.
> Shrinking the table and/or database returned no positive
> impact. executed sp_spaceused on the table with no
> effect.
> Should I truncate the table to release the space? Truncate
> will delete all records and that's not what is
> expected.
> I was expecting that after deleting the blob record
> holding 723556kb of file, this space should be released to
> the os level of my server. hence if I had 2gigs of free
> space, I should now have at least 2.7 gigs. This wasn't
> the case -- even at sql sever level, the space is still
> not released.
> I appreciate your immediate response.
> Stoko
>

No comments:

Post a Comment