3

I have a DacPac that I'm deploying to multiple databases on the same server at once. Because this puts the server under a great load occasionally you get "Lock Timeouts" on this type of deployment. When I intersected the DacPac deployment in SQL Profiler I noticed that the deployment was setting the "Lock Timeout" to 5 seconds before running the rest of the update statements:

set LOCK_TIMEOUT 5000

I would like to change that to be something higher, how do I do this?

Jane
  • 139
  • 1
  • 8
David Rogers
  • 2,601
  • 4
  • 39
  • 84

1 Answers1

4

This fellow says you can set that in the "PreDeployment" script. So following instructions here, I created a "PreDeployment" script: Script.PreDeployment1.sql, and within that I set the lock timeout to 30 seconds.

set LOCK_TIMEOUT 30000

Intercepted that in SQL profiler, seems to be being run correctly. Still not the easiest way to accomplish this, I wonder if there is a better way?

David Rogers
  • 2,601
  • 4
  • 39
  • 84