Design Locking and Granularity levels Flashcards

1
Q

What does lock escalation always escalate to?

A

Table Lock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does lock escalation never escalate to?

A

page lock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens if a transaction attempts to escalate a lock but is unable to because there is an incompatible lock on the table?

A

It attempts to acquire locks at its original more granular level (row, key, page) periodically while checking for escalated locks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you disable lock escalation?

A

Enable trace flag 1211

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does SQL Server determine which transaction to kill in a deadlock scenario?

A

Deadlock Priority

Rollback Cost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Deadlock Priority?

A

The number given to a transaction to show it’s importance to complete the transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Rollback Cost?

A

If two transactions have the same priority, then SQL determines the lowest cost to roll back and kills that session.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly