lock in the select statement | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

lock in the select statement

Hi all, I am using sql server 2000. i have a method in java which is used to retrieve the error_key,error_parent_key value from the database.
i have stored 0 as the parent key value for an error key..
someof the error key are having nested parent keys. if parent key have nested parent key then i will call the same method again to retrieve the parent key. so like wise i will call my method recursively. after few hours, when i accessed the method continouosly, select query is keep on running. why is there any lock in sql server? can u please help me… Thanks
See if this approach helps you
http://www.nigelrivett.net/RetrieveTreeHierarchy.html Madhivanan Failing to plan is Planning to fail
Locks are necessary for any multi-user RDBMS. They need to be there. If you experience serious locking and blocking problems, I would read the locking tips here on the site and check your code accordingly. —
Frank Kalis
Microsoft SQL Server MVP
Heute schon gebloggt?http://www.insidesql.de/blogs