Search unanswered questions...
Enter a question here...

What is rowlock in sqlserver?

[Edit]

A rowlock is the same--no matter what the database. SQLServer, Oracle, Informix, Tandem, etc.

A database's management system, along with the Database Administrator, is responsible for "data integrity".

Here's the scenario for a rowlock:

Susan is responsible for updating the "sales" table for the day's previous sales activity. Since there are not many updates, she sometimes does the inserts/updates during core business hours. One of the current rows in the "sales" table needs the data updated. The database puts a "rowlock" on this row in this table until the update is committed. If Gina is doing a query (read only) on the "sales" table at the same time Susan is updating it, the row that is being updated is "locked" and Gina will see the "before image" of the row. Once Susan commits the update the row is no longer locked and, if Gina runs her query again, she will see the update.

Improve Answer Discuss the question "What is rowlock in sqlserver?" Watch Question

First answer by Ppyles. Last edit by Ppyles. Contributor trust: 125 [recommend contributor]. Question popularity: 6 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Databases > What is rowlock in sqlserver?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
What is sqlserver?  What is the difference between trigger and stored procedure in sqlserver?