Friday, March 30, 2012

lock:timeout in tempdb

Why would we get a lock:timeout in tempdb?
MarkThe use of Global Tables, perhaps? What was locked?
Sincerely,
Anthony Thomas
"Mark Sullivan" wrote:

> Why would we get a lock:timeout in tempdb?
> Mark
>
>|||A table declared locally using declare. I am inserting into or reading from
this table and notice the lock:timeout in profiler. No other process is
using the table.
Mark
"AnthonyThomas" <AnthonyThomas@.discussions.microsoft.com> wrote in message
news:064E6C4F-DF33-4275-9AC8-9797484ECC9A@.microsoft.com...[vbcol=seagreen]
> The use of Global Tables, perhaps? What was locked?
> Sincerely,
>
> Anthony Thomas
>
> "Mark Sullivan" wrote:
>|||Lock Timeout is sort of a misnomer; it is really a Lock WAIT Timeout. The
only reason you get one is because your process had to wait for another to
complete so your's could place an incompatible lock on the object. You
waited too long; so, you got the timeout.
The question is what other process could have held a lock on a locally
declared temporary resource. Locally Declared does NOT mean a local
temporary object. That describes where you created it not the type.
#MyLocalTempTable is a local temp object; whereas, ##MyGlobalTempTable is
globally available, even if declared locally in scope.
If it was a local versus global temp object, the only other process that
could have held a lock would have been SQL Server itself. This would be
disturbing in that it took SQL Server so long to create some sort of work
object. You may have some hardware issues or there is something fishy about
the tempdb.
Sincerely,
Anthony Thomas
"Mark Sullivan" wrote:

> A table declared locally using declare. I am inserting into or reading fr
om
> this table and notice the lock:timeout in profiler. No other process is
> using the table.
> Mark
> "AnthonyThomas" <AnthonyThomas@.discussions.microsoft.com> wrote in message
> news:064E6C4F-DF33-4275-9AC8-9797484ECC9A@.microsoft.com...
>
>sql

No comments:

Post a Comment