Removing Ghost Records

  • Is there a way to force Ghost clean up to remove ghost records from table. (I.E. use With(Index()) ) ?

    I have 14Million+ gohost records from a LOB_data on a table.

    Thanks!

  • Aren't they getting deleted by ghost-row cleanup thread?

    http://support.microsoft.com/kb/932115

    MJ

  • Do you have a clustered index on offending table?... rebuild it, that forces recreation of PFS page then ghost flag will get set right.

    If you do not have a clustered index e.g. heap table, then reorg the table. Same result in regards to PFS page / ghost flag.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • For some reason this table has records that are not getting removed during ghost clean up. I have tried rebuild/reorg and dbshrink (both db and files).

  • Hi Experts,

    I am sorry if am wrong..

    Can anyone please tell me what are ghost records and thier impact?How can we handle the same?

    TIA

  • Ratheesh,

    Those are records that have been logically deleted but not physically deleted from the leaf level of an index.

    By the way wot actualy are you doing in Asianet.?

    Regards,

  • Ratheesh.K.Nair (8/14/2009)


    Can anyone please tell me what are ghost records and thier impact?How can we handle the same?

    http://www.google.com/search?q=SQL+Server+%22ghost+records%22

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Let me try to make my question a little complicated.

    What would be the simplest way to shrink the table.

    1. Drop/Create /put data back

    2.Drop Database

    3. No Idea :o)

    TIA

  • Drop database is a bit extreme. Personally I'd try an index defrag on the cluster with LOB Compact first. If that doesn't work, then rebuild the clustered index

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply