Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DB Locks

Author  Topic 

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2006-02-01 : 05:35:01


Hi

when we execute a simple Qry like select * from emp
why do i see a lock placed which of type dblock.

and it takes around 5 min to release it. can i reduce the time of release.

======================================
Ask to your self before u ask someone

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-01 : 08:51:11
http://www.sql-server-performance.com/blocking.asp

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2006-02-02 : 09:17:20
Thanks Madhivanan but the link does not talk db locks
to my knowledge i have all indexes and no locks specified when access the data dataset


======================================
Ask to your self before u ask someone
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-02 : 09:32:17
I think by default lock will be applied to the table if you use them in queries. you can apply NoLock hint.

Select columns from yourtable(NoLock) where some_Conditions

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2006-02-02 : 10:29:49
Nolock is equivalent to the isolation level READ UNCOMMITTED. I would carefully think about it if this is the right choice.


--
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt? http://www.insidesql.de/blogs
Go to Top of Page
   

- Advertisement -