nerdexam
CompTIA

DS0-001 · Question #78

Which of the following resources is the best way to lock rows in SQL Server?

The correct answer is C. RID. RID (Row Identifier) is the lock resource SQL Server uses to lock a single row in a heap table (a table without a clustered index). When SQL Server needs to protect a specific row from concurrent modification, it acquires a lock on that row's RID - the physical address…

Database Management and Maintenance

Question

Which of the following resources is the best way to lock rows in SQL Server?

Options

  • ATID
  • BSID
  • CRID
  • DPID

How the community answered

(46 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    91% (42)
  • D
    2% (1)

Explanation

RID (Row Identifier) is the lock resource SQL Server uses to lock a single row in a heap table (a table without a clustered index). When SQL Server needs to protect a specific row from concurrent modification, it acquires a lock on that row's RID - the physical address combining file:page:slot that uniquely identifies the row.

Why the distractors are wrong:

  • A. TID - Not a SQL Server lock resource; in other contexts "TID" refers to a transaction ID, which tracks transactions, not locks on individual rows.
  • B. SID - A Security Identifier in Windows/SQL Server, used for authentication and authorization, not row-level locking.
  • D. PID - A Process ID (or in SQL Server, a session/process identifier), used to identify connections, not to lock data rows.

Memory tip: Think Row = RID - the "R" stands for Row, and it's the most granular standard lock resource in SQL Server's locking hierarchy (RID → KEY → PAGE → TABLE).

Topics

#SQL Server#Row locking#RID#Lock resources

Community Discussion

No community discussion yet for this question.

Full DS0-001 Practice