超时后,是否继续执行sql server [英] After timeout, execution of sql server will continue or not
本文介绍了超时后,是否继续执行sql server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将其中一个搜索SP的SQL COMMAND超时设置为2分钟.但是,如果该SP无法在2分钟内返回结果,则该SP的执行将继续或停止.
请让我知道.
谢谢
Hi,
I have set timeout of SQL COMMAND to 2 minutes for one of the SP of search.but if that SP can not return result within 2 minutes then execution of that SP will continue or stop.
Please let me know.
Thanks
推荐答案
所有TSQL调用都在隐式事务中进行.
在.net中,如果SqlCommand
超时,它将ROLLBACK
隐式事务.
因此,您的存储过程将终止并回滚.
唯一的选择是将CommandTimeout
设置为例如3*60
秒.
All TSQL calls operate within an implicit transaction.
In .net if aSqlCommand
times out it willROLLBACK
the implicit transaction.
So your stored procedure will be terminated and rollback.
Your only option is to set yourCommandTimeout
to say3*60
seconds for example.
这篇关于超时后,是否继续执行sql server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文