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 7562257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:22:17+00:00 2026-05-30T13:22:17+00:00

In my SQL tempOrder table has millions of records and with 10 trigger to

  • 0

In my SQL tempOrder table has millions of records and with 10 trigger to update tempOrder table with another table’s update.

So I want to apply apply with(NOLOCK) on table.

I know with

SELECT * FROM temporder with(NOLOCK)

This statement I can do. But is there any way to apply with(NOLOCK) directly to the table from SQL Server 2008.

  • 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-30T13:22:18+00:00Added an answer on May 30, 2026 at 1:22 pm

    The direct answer to your question is NO — there is no option to to tell SQL to never lock tableX. With that said, your question opens up a whole series of things that should be brought up.

    Isolation Level

    First, the most direct way you can accomplish what you want is to use with (nolock) option or SET TRANSACTION ISLOATION LEVEL READ UNCOMMITTED (aka chaos). These options are good for the query or the duration of the connection respectively. If I chose this route I would combine it with a long running SQL Profiler trace to identify any queries taking locks on TableX.

    Lock Escalation

    Second, SQL Server does have a table wide LOCK_ESCALATION threshold (executed as ALTER TABLE SET LOCK_ESCALATION x where X is the number of locks or AUTO). This controls when SQL attempts to consolidate many fine grained locks into fewer coarse grained locks. Said another way, it is a numeric threshold for converting how many locks are taken out on a single database object (think index).

    Overriding SQL’s lock escaltion generally isn’t a good idea. As the documentation states:

    In most cases, the Database Engine delivers the best performance when
    operating with its default settings for locking and lock escalation.

    As counter intuitive as it may seem, from the scenario you described you might have some luck with fewer broad locks instead of NOLOCK. You’ll need to test this theory out with a real workload to determine if its worthwhile.

    Snapshot Isolation

    You might also check out the SNAPSHOT isolation level. There isn’t enough information in your question to know, but I suspect it would help.

    Dangers of NOLOCK

    With that said, as you might have picked up from @GSerg’s comment, NOLOCK can be evil. No-Lock is colloquially referred to as Chaos–and for good reason. When developers first encounter NOLOCK it seems like allowing dirty reads is the only implication. There are more…

    • dirty data is read for inconsistent results (the common impression)
    • wrong data — meaning neither consistent with the pre-write or post-write state of your data.
    • Hard exceptions (like error 601 due to data movement) that terminate your query
    • Blank data is returned
    • previously committed rows are missed
    • Malformed bytes are returned

    But don’t take my word for it :

    • Actual Email: “NoLOCK is the epitome of evil?”
    • SQL Sever NOLOCK hint & other poor ideas
    • Is the nolock hint a bad practice
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SQL Server 2000 I backup a table like below: select * into bkp_table from
SQL: SELECT u.id, u.name, isnull(MAX(h.dateCol), '1900-01-01') dateColWithDefault FROM universe u LEFT JOIN history h
SQL Server 2005 query is as follows...... SELECT ClgId FROM IdMaker_DB WHERE Course =
SQL Server 2008 R2 has supposedly been Released to Manufacturing. Does anyone know when
SQL: SELECT COUNT(*) FROM bb_posts post LEFT JOIN bb_topics topic ON topic.topic_id = post.topic_id
SQL 1: select * from t1 join t2 on t1.f1 = t2.f2 SQL 2:
SQL : SELECT COUNT(usr.id) as `total_results` FROM users as usr LEFT JOIN profile as
SQL Returns the following results from table: CowTracking ID cow_id barn_id -- ------ -------
SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server
SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As

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.