alter column on a large table taking too long

I have a table with 80 million rows of data. I want to alter data type of one of the columns on this table (varchar to numeric), but the alter column sql has been running for an hour now, still not done, and has a lock on the table. Is there a faster way to alter column on a large table.

Thanks for your help.
patd1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kanti PrasadCommented:
Hi

Try to create a new table like the old one and then alter the new one and insert data from the old table into the new one and then rename the old table and then rename the new table to the old one and then delete the renamed old table.

Here is a link that will give you an idea
http://dba.stackexchange.com/questions/3760/alter-table-on-a-large-table-with-an-indexed-column

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Randy PooleCommented:
Normally you would place the database into single user mode.
Aneesh RetnakaranDatabase AdministratorCommented:
If its already running, you can wait till it finishes.  Otherwise  As Kanti Prasad Mentioned, you can try creating another table with the new structure and populate the data;
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

patd1Author Commented:
Thanks for your suggestions.

I cancelled the query after waiting for too long, but now it is in "cancelling" mode for a long time. Is there a way i can make it cancel faster so I can work on creating new table /move data and rename as suggested.

Thank you again.
Randy PooleCommented:
Not without compromising the data.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Cancelling the operation might have been worse than allowing it to finish. All changes made up to now need to get rolled back - a more costly operation than the operation itself usually.
patd1Author Commented:
The disk IO was only showing 5 million, while the whole table is 80 million rows. Completing it would have take a couple days at that speed.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Always difficult to tell whether you should cancel or let go,  but in that case I would have cancelled too probably. Be prepared to wait at least twice the time it took to get there for rolling back.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.