You are here: Re: SQL 2000 Error: 1203, Severity: 20, State: 1 Error « MsSQL Server « IT news, forums, messages
Re: SQL 2000 Error: 1203, Severity: 20, State: 1 Error

Posted by Erland Sommarskog on 07/17/06 20:35

wreed (whreed@gmail.com) writes:
> Erland Sommarskog wrote:
>>
>> SQL Server times out? If you get a message "Timeout expired" that is a
>> client-side timeout. Or have you enabled lock timeouts.
>>
>> > Error: 1203, Severity: 20, State: 1
>> >
>> > Process ID 62 attempting to unlock unowned resource PAG: 6:1:126407.
>> >...
>> > So to avoid this error which I assume is due to my xlock should I
>> > rethink my query?
>>
>> 1203 is definitely to regard as an internal server error, so you are
>> hitting a bug of some sort.
>>
>> It would be interesting to know what happens first, the timeout or the
>> 1203. And what sort of timeout you get.
>>
>> Since by default most client libraries has a default timeout of 30
>> seconds, I assume that you have a client-side timeout. When you get
>> such a timeout, you should always issue a IF @@trancount > 0 ROLLBACK
>> TRANSACTION, because there is no automatic rollback on timeouts.
>
> Can it be that I am running a TOP 1 and the query is actually pulling a
> whole query back then only taking the top row? Or am I totally wrong
> on how a TOP 1 works.

Exactly how a TOP 1 is implemented is up to the optimizer. And what
ORDER BY clause you specified.

Yes, TOP 1, could be part of the reason you get this error, although
the locking hints are even more suspects in this case. But as I said,
this is an internal server error. It should simply not occur, and when
it does, it's not your fault.

....unless you first get the query timeout, and you then fail to rollback
the transaction, and the error happens because this creates a mess.

So when this scenario, do you first get a timeout (which happens in the
client), or do you first get the 1203 error?


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация