March 11, 2009 at 5:05 am
Hi Experts,
I am getting an exclusive lock on a particular table whenever i ran a select * from statement. The table is having less than 3600 rows. I checked the activity monitor and in lock by processes i found an objects named dbname.dbo.spt_fallback_db.I am not able to find that object in sysobjects table.
Please help
TIA
March 11, 2009 at 10:56 am
That object exist in the master DB; however I am not sure the purpose for it. I can't find much information on these tables.
Thanks.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
March 11, 2009 at 11:58 am
Have you tried using query hints (nolock)?
March 11, 2009 at 3:43 pm
spt_fallback_db is in master and is a system table.
* Noel
March 12, 2009 at 3:08 am
I know its in master database but in activity monitor its showing database_name.dbo.spt_fallback_db.
when giving NOLOCK hint there is no problem without that its worst.
The issue get solved when i reorganized the index in that table.
But i just want to know how and why that lock happened .The table is a very small one having less than 3600 rows.Now the query is taking less than a second.
March 12, 2009 at 4:35 am
SELECT * .. should have created a shared lock on the table; not an exlusive one if you find the answer please let us know :pinch:. But even shared lock would have casued blockage (mind you it would have been very breif).
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
March 12, 2009 at 4:44 am
Mohit ,the problem is that whoever runs a select * statement in that table creates lock.
March 12, 2009 at 5:28 am
Try update statistics and reorganize indexes.itokke njn paranju tarano.
i told you yesterday na 😛
March 12, 2009 at 5:09 pm
- what isolation level are you using?
- also, I am presuming your sure that this is an exclusive lock not an index lock?
- the optimizer will lock objects if it deems it will yield the best query performance. Out of date statistics and a fragmented index are a prime combo for this type of thing.
Carlton ..
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply