We help IT Professionals succeed at work.
Get Started

blowing the tran log

493 Views
Last Modified: 2012-05-09
alter table tablename
alter column columname varchar(5) null
go

just expanding an attribute from char(2) to varchar(5).  
the table is pretty big, about 492984336 records, and i keep blowing the tran log about an hour or so into the job.  

i didn't want to just keep restarting, so now i've created a table2, and am actively copying the data in there in batches of 50K, so the tran log doesn't blow out on me.  the database is completely unused right now.  nobody is on it but me... but, I need to get this done asap.  

it's been running for near 5 1/2 hours, and i'm not even a quarter of the way there.

the basic alter table construct kept blowing the log, and this route seems to be working, but far too slowly.  i'm still going to need to recreate the indices on this thing, once the data is loaded, and my window to do it in, is just not that large.

this may just be all I've got, but i wanted to see if anybody had any tips or tricks, that may help me out in this regard.
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 3 Answers and 14 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE