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.
| Author |
Topic |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-04-14 : 01:20:16
|
| What is the difference betweenn,Isolation level, lock types and query hints?Thank you.Ravi Lobo------------------------I think, therefore I am |
|
|
cas_o
Posting Yak Master
154 Posts |
Posted - 2004-04-14 : 04:45:12
|
| Isolation level is how much data the DB engine needs to lock to perform a transaction. e.g. 1 record, a page, primary/foreign key, index, whole table or whole database. 1 record being the lowest level.Lock types or modes in SQL server are basically: shared, update, exclusive, intent, and schema. e.g. Inserts need an exclusive lock, this cannot be obtained if a shared lock from another connection is in force at the same isolation level.query hints allow you to circumvent this default behaviour. For example select * from table with(NOLOCK) allows you to read rows that are dirty (i.e in the middle of being updated, inserted or deleted) which normally you would have to wait for the update/delete/insert to be committed before the recordset is returned to you.read BOL, search locking architecture its all there.;-] |
 |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-04-14 : 04:58:07
|
| Thank You.I have more questions.How these 3 things are inter related? Is there anything which can be achieved only by one of them and not by other options?------------------------I think, therefore I am |
 |
|
|
cas_o
Posting Yak Master
154 Posts |
Posted - 2004-04-14 : 07:07:52
|
| I don't want to seem un-forthcoming but I think you need to do some reading of Books online that comes with SQL Server, or the great articles on this site, because these 3 things interrelate in many different combinations doocumented in hundreds of ways in hundreds of books, articles sites blah blah... However, if you want to ask something specific, relevant to a particular situation you are in at the moment, then go ahead I'm all ears.for example: I have this TSQL statement..blah the table is indexed blah.. what locking is occuring in my db? |
 |
|
|
|
|
|
|
|