July 17, 2006 at 1:12 pm
Our SQL Server 200 box is getting perflib errors when we get a decent
amount of people using an application that I wrote, call queue system,
web based. To accomplish a queue type system on a button push I wrote
a query like this...
BEGIN TRANSACTION;
Select top 1...fields here...
FROM table with (xlock,readpast)
(2 joins)
WHERE numerous where clauses
ORDER BY 2 order bys.
Now our sql server starts timing out..then in the app log this shows
up....
Error: 1203, Severity: 20, State: 1
Process ID 62 attempting to unlock unowned resource PAG: 6:1:126407.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
The reason I am doing xlock is to make a record not viewable to 2
people if they click the button on the web form that runs the above
query within the same minute, they would get different records....
So to avoid this error which I assume is due to my xlock should I
rethink my query?
Is there anyway to redo my query to not do top 1 and still select one
record????
This is frustrating.
July 18, 2006 at 1:15 am
I would suggest you do an integrity check on your database. It looks like you might have allocation errors.
DBCC
CheckDB ('<YourDBName>') WITH PHYSICAL_ONLY
Errors caused by queries generally have a severity around 16. A severity of 20 indicates a serious problem.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 18, 2006 at 7:19 am
Thanks for the suggestion but it comes back ok.
DBCC results for 'dbname'.
CHECKDB found 0 allocation errors and 0 consistency errors in database 'dbname'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
July 18, 2006 at 12:39 pm
Can you tell what is your service pack level ?
There has been issues like this reported on hot fixes: http://support.microsoft.com/?kbid=814654
* Noel
July 18, 2006 at 12:42 pm
SQL 2000 SP4 I saw that kb doc....
July 18, 2006 at 12:51 pm
In that case, the best bet is to call PSS.
* Noel
July 18, 2006 at 12:53 pm
What is PSS?
July 18, 2006 at 1:31 pm
Microsoft Product Support Services
* Noel
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply