|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
UPDLOCK, HOLDLOCK combination hintIn Goran Rissler's question earlier today (Transaction deadlock on
Tablelocks), a suggestion was made to use a locking hint combination. I do not understand how a locking hint combination works. Does it use the first hint first and apply the second hint when the first hint no longer applies? -- Regards, Jamie "thejamie" <theja***@discussions.microsoft.com> wrote in message There a multiple types of hints, some control the granularity of the locks news:0FD5BCDB-7885-4985-8D09-27066FB1B5FA@microsoft.com... > In Goran Rissler's question earlier today (Transaction deadlock on > Tablelocks), a suggestion was made to use a locking hint combination. I > do > not understand how a locking hint combination works. Does it use the > first > hint first and apply the second hint when the first hint no longer > applies? > -- > Regards, > Jamie (TABLOCK, TABLOCKX, ROWLOCK, PAGELOCK) others control what type of lock to take (NOLOCK, UPDLOCK, XLOCK..). You can only specify one of each type, so one controling granulairy and one controling type. Then there are other hints wich control how long to hold the lock HOLDLOCK Hope that gives you an idea. /Göran Then you can only apply one hint at a time?
Example: Select * from ATable with (updlock, xlock) where situation=event Is not a possibility...? -- Show quoteHide quoteRegards, Jamie "Göran Rissler" wrote: > > "thejamie" <theja***@discussions.microsoft.com> wrote in message > news:0FD5BCDB-7885-4985-8D09-27066FB1B5FA@microsoft.com... > > In Goran Rissler's question earlier today (Transaction deadlock on > > Tablelocks), a suggestion was made to use a locking hint combination. I > > do > > not understand how a locking hint combination works. Does it use the > > first > > hint first and apply the second hint when the first hint no longer > > applies? > > -- > > Regards, > > Jamie > > There a multiple types of hints, some control the granularity of the locks > (TABLOCK, TABLOCKX, ROWLOCK, PAGELOCK) others control what type of lock to > take (NOLOCK, UPDLOCK, XLOCK..). You can only specify one of each type, so > one controling granulairy and one controling type. Then there are other > hints wich control how long to hold the lock HOLDLOCK > > Hope that gives you an idea. > > /Göran > > >
Transaction deadlock on tablelocks
T-SQL Data Scrub Nightmare SQL 2000 Profiler question. Uninstall SQL Server Configuration Manager Restore from SQL 2000 backup to 2005 locks user table relationship help translating ERD to SQL Server tables How to modify a report in Crystal Report 7.0 Settings change that requires SQL 2005 restart How to script index in 2005 |
|||||||||||||||||||||||