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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:14:09+00:00 2026-06-11T22:14:09+00:00

I am running into the problem when I am importing data to a large

  • 0

I am running into the problem when I am importing data to a large table, the entire website goes down until the import is finished. this can take up to 3 hours for the insert/update process to finish. Also, if for some reason an exception is thrown the tables remain locked indefinitely until the application pool is restarted.

I looked into what was happening. Apparently the tables touched are locked until this process is finished. If this was direct SQL queries, I would add “with (NOLOCK)” to the query to solve the problem. However, I can’t figure out how to tell Fluent NHibernate to add that to the queries it generates.

Also, is there a way when building the Session Factory that I can put in a setting to turn on “with (NOLOCK)” by default into all the queries?

Thanks in advance.

  • 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-06-11T22:14:10+00:00Added an answer on June 11, 2026 at 10:14 pm

    When you open your session or stateless session, begin a transaction with IsolationLevel.ReadUncomitted. This is the equivalent of specifying NOLOCK on all statements in that transaction.

    using (var session = _sessionFactory.OpenSession())
    using (var transaction = session.BeginTransaction(IsolationLevel.ReadUncommitted))
    {
        // do work
    
        transaction.Commit();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running into a problem. I have a table defined to hold the values of
I'm running into the problem of users being able to submit data with '
I'm running into this problem when trying to call a SOAP Web Service from
I'm running MySQL 5.1 and storing data from web logs into a table. There
I am running into the same problem as in this question: How do you
I have problem with importing jar file and running in Geany IDE . This
I'm running into a problem when trying to create an ArrayList in Java, but
I'm running into a problem inserting rows from a file with 13,000 rows into
I'm running into a problem when trying to select records from my 2005 MS-SQL
I am running into a problem that just doesn't seem right. I've got a

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.