Showing posts with label tochange. Show all posts
Showing posts with label tochange. Show all posts

Thursday, February 16, 2012

Column datatype change

We have an 18 GB table in a 39 GB database. In this table,
4 of the columns declared as char(255) and we want to
change these 4 columns to a varchar(255) to save some
space (It saves about ~3 GB).
We also have only 8 GB left on the hard drive. When I
tryed to run it, it ran out of disk space. There are 3
other columns in the table and primary key and an index on
these columns (Not the ones we are trying to change).
How can I change the datatypes of these columns without
running out of space ?. We will add more space but not
immediatelly.
I did put the database on 'Simple' mode before I ran the
query but no help.
Thanks for any suggestions.I do not think there is much you can do unless you get more disk
space...Perhaps you could copy it to another server?
Drop all indexes and do the work, then re-create the indexes... That should
give you some space... ( what a pain tho)
"Andy" <anonymous@.discussions.microsoft.com> wrote in message
news:8c6f01c3e9bb$b04df100$a501280a@.phx.gbl...> We have an 18 GB table in a
39 GB database. In this table,
quote:

> 4 of the columns declared as char(255) and we want to
> change these 4 columns to a varchar(255) to save some
> space (It saves about ~3 GB).
> We also have only 8 GB left on the hard drive. When I
> tryed to run it, it ran out of disk space. There are 3
> other columns in the table and primary key and an index on
> these columns (Not the ones we are trying to change).
> How can I change the datatypes of these columns without
> running out of space ?. We will add more space but not
> immediatelly.
> I did put the database on 'Simple' mode before I ran the
> query but no help.
> Thanks for any suggestions.