Timeout saving table in SQL Server

Solution 1:

Sounds like a timeout setting. So your SSMS thinks it takes too long and cancels the connection for you. The SQL server roles back. But there is help. You are not the first person to encounter this.

See here.

For everybody who doesn't want to click the link. Here is the price winning answer:

After hitting the same error, I stumbled upon the corrent setting.

In the Management Studio, from the Tools menu, select Options, then click "Designers". There is an option called "Override connection string time-out value for table designer updates:" In the "Transaction time-out after:" box, you will see the magic 30 seconds

Solution 2:

//DO THE FOLLOWING:

Open SQL Server management studio--> Tools Menu--> Options--> Designers Tab--> Table and Database Designer--> Increase the timeout from 30seconds to 65535 seconds.--> OK

//Now you can save your table changes. //Hope that helps, and check out my blog @: //www.ogolla.blogspot.com

Solution 3:

This answer came up for me in Google even though I was adding an index, not changing a column.

There is a better way to do long running changes:

  1. Make the changes you want to the design of the table. Don't press "Save".

  2. In SSMS click Table Designer... Then Generate Change Script...

SSMS click Table Designer, Generate Change Script

  1. In the window you will see a script that when executed will make the changes you've queued in the designer.

Change Script

  1. You can save and run that script in SMSS or what you can do when you have confidence is "copy" the script from that window onto the clipboard. Say "no" to saving the file. Then Close the Designer WITHOUT SAVING (techincally losing your DB changes) and open a new Query window. Paste the Change Script then Execute the script. Your changes will then be applied to the DB even if it takes years.