How can I change the timeout for a manually executed query in SQL Server?

后端 未结 7 1823
终归单人心
终归单人心 2021-01-11 19:15

I have a simple SQL script that I execute manually from Visual Studio. It is a data generation script so I expect it to take a couple of minutes to run. But I get the follow

7条回答
  •  旧巷少年郎
    2021-01-11 19:41

    If you use SQL Management Studio, there are two settings in the options (I'm referring to Management Studio from SQL Server 2005, which I use):
    (my Management Studio is in German, so I hope I translated the names correctly into English)

    You can find both in the menu under "Extras" --> "Options"

    In the options, the first one is under "Query Execution", you can set the "Execution Timeout" there (mine was on zero already)

    The second one (and I think this is what you need) is the first option under "Designer", it says something like "Override Timeout for table designer updates", you can check a box and put in a value there.
    Some time ago, I had a problem similar to yours (timeout message when running ALTER TABLE on a large table), and I solved it by setting this option to a higher value.

提交回复
热议问题