Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Change field data type , query timeout Expand / Collapse
Posted Friday, September 3, 2010 8:42 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 11:26 AM
Points: 942, Visits: 1,333

I need to change a data type of a field in SQL Server 2005.
The fiels most be changed from varchar(13) to varchar (20), but because of the amout of data it is taking to much time so i receive a timeout message from SQL Server on Query window.

Can i change the timeout , so that this query (alter table ….) can run?

Thank you
Post #980248
Posted Monday, September 6, 2010 4:53 AM


Group: General Forum Members
Last Login: Monday, October 10, 2016 5:25 AM
Points: 451, Visits: 1,079
1. Increase the query timeout period in Tools-->Options-->....
2. Otherwise create a tbl with same structure but with datatype changed for that field and then insert records into it. then Rename/delete the old table.
Internally sql also does the same... dropping the old table and creating a new table while inserting all records into a temp table.
Post #981022
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse