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

后端 未结 7 1752
终归单人心
终归单人心 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:39

    Increasing the CommandTimeout property will solves the problem i.e.

    SqlCommandObject.CommandTimeout = 500000

提交回复
热议问题