2
我可以通过SqlConnection或其他方式在我的.NET程序中设置存储过程的DEADLOCK_PRIORITY吗?或者它只能通过可以通过.NET中的SqlConnection设置DEADLOCK_PRIORITY吗?
SET DEADLOCK_PRIORITY...
调用存储过程本身?
谢谢大家。
我可以通过SqlConnection或其他方式在我的.NET程序中设置存储过程的DEADLOCK_PRIORITY吗?或者它只能通过可以通过.NET中的SqlConnection设置DEADLOCK_PRIORITY吗?
SET DEADLOCK_PRIORITY...
调用存储过程本身?
谢谢大家。
当你打开一个连接只执行
SET DEADLOCK_PRIORITY...
例如:
dim cn as new SqlConnection(cstring)
Dim cmd as SQlCommand=cn.CreateConnection
cmd.CommandText="SET DEADLOCK_PRIORITY NORMAL"
cn.Open
cmd.Execute
设置的内容仍然有效,直到连接被关闭。
无法设置DEADLOCK_PRIORITY - 请参阅All SQL Server SqlConnection properties或Setting a deadlock victim