Sql server® 2012 t-sql fundamentals



Download 10,93 Mb.
Pdf ko'rish
bet341/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   337   338   339   340   341   342   343   344   ...   443
Bog'liq
BookSQL

Lockable resource Types

SQL Server can lock different types of resources. The types of resources that can be locked include 

RIDs or keys (row), pages, objects (for example, tables), databases, and others. Rows reside within 

pages, and pages are the physical data blocks that contain table or index data. You should first famil-

iarize yourself with these resource types, and at a more advanced stage, you might want to familiarize 

yourself with other lockable resource types such as extents, allocation units, and heaps or B-trees. 

To obtain a lock on a certain resource type, your transaction must first obtain intent locks of 

the same mode on higher levels of granularity. For example, to get an exclusive lock on a row, your 

transaction must first acquire an intent exclusive lock on the page where the row resides and an in-

tent exclusive lock on the object that owns the page. Similarly, to get a shared lock on a certain level 

of granularity, your transaction first needs to acquire intent shared locks on higher levels of granular-

ity. The purpose of intent locks is to efficiently detect incompatible lock requests on higher levels of 

granularity and prevent the granting of those. For example, if one transaction holds a lock on a row 

and another asks for an incompatible lock mode on the whole page or table where that row resides, 

it is easy for SQL Server to identify the conflict because of the intent locks that the first transaction 

acquired on the page and table. Intent locks do not interfere with requests for locks on lower levels 

of granularity. For example, an intent lock on a page doesn’t prevent other transactions from acquir-

ing incompatible lock modes on rows within the page. Table 9-2 expands on the lock compatibility 

table shown in Table 9-1, adding intent exclusive and intent shared locks.


Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   337   338   339   340   341   342   343   344   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish