Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
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: Wednesday, November 18, 2015 8:47 AM
Points: 860, Visits: 1,191

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, November 16, 2015 12:16 PM
Points: 443, Visits: 1,068
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