Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:16:46+00:00 2026-05-28T08:16:46+00:00

I have a table to update with no indexing in the where clause so

  • 0

I have a table to update with no indexing in the where clause so I use ROWLOCK in the update script, hoping to get row lock instead of table lock but no luck.. so what is the function of the ROWLOCK then? I was using it in the select statement but still locking the entire table… so annoying!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:16:47+00:00Added an answer on May 28, 2026 at 8:16 am

    If you selecting too many rows – Sql Server will escalate lock to table level. Instead you may hit the cap of possible locks count or memory

    OR

    You use SNAPSHOT isolation level – then you may only apply ROWLOCK hint with HOLDLOCK or UPDLOCK hints simultaneously

    Update:

    You may frame your statement with

    DBCC TRACEON(-1,3604,1200) WITH NO_INFOMSGS;
    
    Here is your statement
    
    DBCC TRACEOFF(-1,3604,1200) WITH NO_INFOMSGS;
    

    and see – which locks are taken, held and released during the run

    UPDATED:

    DBCC TRACEON (-1, 3604, 1200)

    BEGIN TRAN

    UPDATE [Order]

    with (ROWLOCK)

    SET ProductId = 3

    WHERE CustomerId = 1

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Process 54 acquiring IX lock on OBJECT: 16:229575856:0 (class bit2000000 ref1) result: OK

    Process 54 acquiring IU lock on PAGE: 16:1:196 (class bit0 ref1) result: OK

    Process 54 acquiring U lock on RID: 16:1:196:0 (class bit0 ref1) result: OK

    Process 54 acquiring IX lock on PAGE: 16:1:196 (class bit2000000 ref0) result: OK

    Process 54 acquiring X lock on RID: 16:1:196:0 (class bit2000000 ref0) result: OK

    Process 54 releasing lock reference on RID: 16:1:196:0

    Process 54 acquiring U lock on RID: 16:1:196:1 (class bit0 ref1) result: OK

    Process 54 releasing lock on RID: 16:1:196:1

    Process 54 releasing lock reference on PAGE: 16:1:196

    (1 row(s) affected)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have (another) question about indexing. I use the following code: CREATE TABLE [dbo].[PnrDetails1](
I know I'm going to get flamed for this, but.... I have table ProductA,
I have table 'products' and I need to update 'price' field by 20% if
I have a table where on a single record update, a trigger adds a
I have a table which is updated with ajax and after update it if
I have a Table View Controller with cells. I want to update the text
I have one table TABLE_EXAM . i need to update the value of specific
I have a table named POS_File_Detail . I would like to update Line_Number based
I have a table trigger like below: CREATE OR REPLACE TRIGGER PAT_BUR_DOB_TRG BEFORE UPDATE
I have a table, let's call is [MYTABLE] , with an FOR INSERT, UPDATE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.