Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table locks

Status
Not open for further replies.

jonsey

Programmer
Jun 17, 2002
3
0
0
US
How does one change a lock or can u change a lock from DB type to the row level type on a table for updating purposes??
thanks
 
To change the lock you need to use locking hints, search BOL for
locking hints and SET TRANSACTION ISOLATION LEVEL

Example to force No locks while reading data from authors table in Pubs database

SELECT au_lname FROM authors WITH (NOLOCK)


dbtech
 
Most of the time you should let SQL Server handle the locking. It is important to understand locking and the situations where the use of hints is advisable. In addition to the SQL BOL locking topics, I recommend the following. Some were written for SQL 7 but apply to SQL 2000 as well.

SQL BOL: Locking

SQL BOL: Understanding Locking in SQL Server

Tek-Tips FAQ:
How can I eliminate or reduce locking?




Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top