Deleting text data

  • How do I remove the text page allocated to a text field after I've deleted the text in the field? Setting it to NULL doesn't appear to do the trick either. I'm basing this on the fact that I set all of my text fields to NULL but I still have the same amount of space used as reported by sp_spaceused.

  • The database doesn't shrink when you delete data from it.

    It happens only when you shrink it.

    Look up DBCC SHRINKDATABASE in bol.

  • Doesn't it also shrink when you back it up? 

    I wasn't born stupid - I had to study.

  • I was refereing to the size of the table as reported by sp_spaceused (i.e sp_spaceused 'tablename').

  • you can use dbcc cleantable(tablename). This will clean the table if any of text or varying field length column deleted from table.

  • I didn't know it happens with a backup!!! Is it implicitly done or do you explicitly force a shrink ?! What is the syntax ?







    **ASCII stupid question, get a stupid ANSI !!!**

  • Sushila,

    I could be wrong (and it wouldn't be the first time today) but I think he's referring to having the Auto-Shrink option turned on which isn't always a good option in some installs.

    My hovercraft is full of eels.

Viewing 7 posts - 1 through 6 (of 6 total)

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