Dropping an IMAGE data type from a table.

  • I really should know this but...

    If i drop an image column from a table (using: alter table drop column) where the image column takes up about 50Gb of the database there is no change in the size of the database.

    In the end i just ended up creating a new table and dts'ed the data into the new table. Though im interested to find out the proper way to do this for future use?

    Thanks

    PostIT



    Nuke the site from orbit, its the only way to be sure... :w00t:

  • Hello PostIT,

    This is a common factor that the database increases its size as soon as data is inserted. You are talking here about the images which takes lots of space in the database which eventually increases the size of the database. When you drop the column from the table it in turn doesn't reduce the size of the database but you need to shrink the database which sometimes will reduce the database size.

    Hope this helps.

    Thanks


    Lucky

  • When looking at the database with the taskpad view in Enterprise Manager it was still saying the data in use size was the same as before.

    Just to clarify. After dropping the column i did the following actions before resorting to dts'ing

    Shrink with the "Move pages to beginning" option checked.

    reindexed all the pk on the table.

    Even after these actions the database size was unchanged.



    Nuke the site from orbit, its the only way to be sure... :w00t:

  • Another option would be to run an update statement to set the column to null and then drop the column.



    Nuke the site from orbit, its the only way to be sure... :w00t:

Viewing 4 posts - 1 through 3 (of 3 total)

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