Change field data type , query timeout

  • Hi,

    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

  • 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.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply