How can I change the timeout for a manually execut

2019-02-16 15:11发布

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 following error.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I don wan't to change any global server settings to be able to run this one file. Is there any commands that I could put at the top of the file to increase the timeout for just that script/transaction?

7条回答
迷人小祖宗
2楼-- · 2019-02-16 15:48

SQL Server will wait indefinitely before returning to the user. More than likely there was a client side timeout property set. For example you can set a timeout property for the ADO command object.

Cheers, Andy.

查看更多
登录 后发表回答