From: unsy on
I have a HEAP with 500 million rows in SQLServer 2005 - Standard Edition -
SP2 (I know!).

The table keeps growing and even though I've deleted 50million+ rows WITH
TABLOCK this hasn't reclaimed any of the space ...

These are still marked as Ghost records in dm_db_index_physical_stats (DB_ID()
,,,,'DETAILED').

Can anyone advise on the Ghost Cleanup Job ... I've checked for Trace 661 and
it shold be running.

I'm in a catch 22 ... want to add a Clustered Index, but need to free up some
space to enable me to do this and the longer this goes on the less disk space
I'm being left with.

Thanks Unsy

From: Uri Dimant on
unsy
DBCC SHRINKFILE does not work?


"unsy" <u59173(a)uwe> wrote in message news:a6219ffb91555(a)uwe...
>I have a HEAP with 500 million rows in SQLServer 2005 - Standard Edition -
> SP2 (I know!).
>
> The table keeps growing and even though I've deleted 50million+ rows WITH
> TABLOCK this hasn't reclaimed any of the space ...
>
> These are still marked as Ghost records in dm_db_index_physical_stats
> (DB_ID()
> ,,,,'DETAILED').
>
> Can anyone advise on the Ghost Cleanup Job ... I've checked for Trace 661
> and
> it shold be running.
>
> I'm in a catch 22 ... want to add a Clustered Index, but need to free up
> some
> space to enable me to do this and the longer this goes on the less disk
> space
> I'm being left with.
>
> Thanks Unsy
>


From: Uri Dimant on
Also
SQL Server 2008 provides ALTER TABLE tblname REBUILD to rebuild a heap


"Uri Dimant" <urid(a)iscar.co.il> wrote in message
news:eHIJdai1KHA.5828(a)TK2MSFTNGP02.phx.gbl...
> unsy
> DBCC SHRINKFILE does not work?
>
>
> "unsy" <u59173(a)uwe> wrote in message news:a6219ffb91555(a)uwe...
>>I have a HEAP with 500 million rows in SQLServer 2005 - Standard Edition -
>> SP2 (I know!).
>>
>> The table keeps growing and even though I've deleted 50million+ rows WITH
>> TABLOCK this hasn't reclaimed any of the space ...
>>
>> These are still marked as Ghost records in dm_db_index_physical_stats
>> (DB_ID()
>> ,,,,'DETAILED').
>>
>> Can anyone advise on the Ghost Cleanup Job ... I've checked for Trace 661
>> and
>> it shold be running.
>>
>> I'm in a catch 22 ... want to add a Clustered Index, but need to free up
>> some
>> space to enable me to do this and the longer this goes on the less disk
>> space
>> I'm being left with.
>>
>> Thanks Unsy
>>
>
>