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
 General SQL Server Forums
 New to SQL Server Programming
 How to Lock a Table

Author  Topic 

Amjath
Yak Posting Veteran

66 Posts

Posted - 2006-03-21 : 06:17:58
Hai to all,

I want to lock a patricular table during my transaction is this possible, for Example

Create sp() as
BEGIN
Lock Table
Do Some work
Relaese the Lock
END

like this.

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2006-03-21 : 06:26:15
Read up on transaction isolation levels, and make sure you fully understand how SQL Server handles concurrency.

Mark
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-03-21 : 06:28:10
look out locking ,Table-Level in Book online

Sucess Comes to those who Believe in Beauty of their Dream..
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-21 : 06:47:30
Use

Begin Transaction

--Some process

Commit Transaction

Madhivanan

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

- Advertisement -